@@ -0,0 +1,1144 @@
+package com.javarush.task.task08.task0829;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0A%0A/* %0A%D0%9C%D0%BE%D0%B4%D0%B5%D1%80%D0%BD%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F %D0%9F%D0%9E%0A*/%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A%0A        HashMap%3CString, String%3E cityNameLastName = new HashMap%3C%3E();%0A        while (true) %7B%0A            StringBuffer buffer = new StringBuffer();%0A            buffer.append(reader.readLine());%0A            if (buffer.toString().isEmpty()) break;%0A%0A            buffer.append(%22 %22).append(reader.readLine());%0A%0A            cityNameLastName.put(buffer.substring(0, buffer.indexOf(%22 %22)), buffer.substring(buffer.indexOf(%22 %22) + 1));%0A%0A            buffer.delete(0, buffer.length());%0A        %7D%0A%0A        String inputCityName = reader.readLine();%0A        reader.close();%0A%0A        if (!inputCityName.isEmpty() && cityNameLastName.containsKey(inputCityName)) %7B%0A            System.out.println(cityNameLastName.get(inputCityName));%0A        %7D%0A    %7D%0A%7D%0A

Complete task0829