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

Problem_ID: E
Result: Accepted
Time: 78ms
Memory: 25320kB
Author: 13819973890
In contest: 1300

t,n=map(int,input().split())
dictl={}
for i in range(t):
    r=input().split()
    dictl[r[0]]=r[1]
for i in range(n):
    print(dictl[input()]+" ",end="")