Start: Jul, 17, 2019 00:00:00
20190717Python程序设计基础培训扩展练习
End: Jul, 21, 2019 00:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 48ms
Memory: 25320kB
Author: 13372527218
In contest: 1296

t,n = map(int,input().split())
dic = {}
for i in range(t):
    a,b = input().split()
    dic[a] = b
for i in range(n):print(dic[input()],end = (' ' if i != n-1 else ''))