def main():
magicDict = dict()
while True:
line = input().strip()
if line == '@END@':
break
idx = line.index(']')
spell, magic = line[0:idx+1], line[idx+2:]
magicDict[spell] = magic
magicDict[magic] = spell[1:-1]
N = int(input())
for i in range(N):
words = input().strip()
response = magicDict.get(words,'what?')
print(response)
if __name__=='__main__':
main()
KY146 魔咒词典
最新推荐文章于 2024-10-30 13:16:11 发布