Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d = {}
- n = int(input())
- for j in range(n):
- country, *all_city = input().split()
- for city in all_city:
- d[city] = country
- n = int(input())
- for j in range(n):
- town = input()
- print(d[town])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement