Zad/ppr 32.py

12 lines
225 B
Python
Raw Permalink Normal View History

2019-01-23 14:48:08 +01:00
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=' ')