int input synonyms for in range word1 word2 input split synonyms word1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
n = int(input())
synonyms = {}
for i in range(n):
word1, word2 = input().split()
synonyms[word1] = word2
synonyms[word2] = word1
target_word = input()
print(synonyms[input()])