point out
package com.codegym.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/*
Software update
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// List of cities
HashMap<String, String> cities = new HashMap<>();
while (true) {
String city = reader.readLine();
String family = reader.readLine();
if (city.isEmpty() || family.isEmpty()) break;
cities.put(city,family);
}
// Read the city name
String cityName = reader.readLine();
if (cities.containsKey(cityName)) {
String familyName = cities.get(cityName);
System.out.println(familyName);
}
}
}