@@ -0,0 +1,1089 @@
+package com.javarush.task.task07.task0716;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.util.ArrayList;%0A%0A/* %0A%D0%A0 %D0%B8%D0%BB%D0%B8 %D0%9B%0A*/%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        BufferedReader bis = new BufferedReader(new InputStreamReader(System.in));%0A%0A        ArrayList%3CString%3E list = new ArrayList%3CString%3E();%0A        list.add(%22%D1%80%D0%BE%D0%B7%D0%B0%22); //0%0A        list.add(%22%D0%BB%D0%BE%D0%B7%D0%B0%22); //1%0A        list.add(%22%D0%BB%D0%B8%D1%80%D0%B0%22); //2%0A        list = fix(list);%0A%0A        for (String s : list) %7B%0A            System.out.println(s);%0A        %7D%0A    %7D%0A%0A    public static ArrayList%3CString%3E fix(ArrayList%3CString%3E list) %7B%0A%0A        for (int i = 0; i %3C list.size();) %7B%0A            if (list.get(i).contains(%22%D0%BB%22) && list.get(i).contains(%22%D1%80%22)) %7B%0A                i++;%0A            %7D else if (list.get(i).contains(%22%D1%80%22)) %7B%0A                list.remove(i);%0A            %7D else if (list.get(i).contains(%22%D0%BB%22)) %7B%0A                list.add(i + 1, list.get(i));%0A                i += 2;%0A            %7D else %7B%0A                i++;%0A            %7D%0A        %7D%0A        return list;%0A    %7D%0A%7D

Complete task0716