12 lines
225 B
Python
12 lines
225 B
Python
sl = {}
|
|
for _ in range(int(input())):
|
|
a,b = input().split()
|
|
sl[a] = b
|
|
|
|
input()
|
|
for wyr in input().split():
|
|
if wyr in sl.keys():
|
|
print(sl[wyr], end=' ')
|
|
else:
|
|
print(wyr, end=' ')
|