• + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    from collections import defaultdict
    
    val = int(input())
    
    dct = defaultdict(lambda: 0)
    
    for q in range(val):
        name, phone = input().split()
        dct[name] = phone
    
    for i in range(val):
        searchedName = input()
        if dct[searchedName] == 0:
            print("Not found")
        else:
            print(searchedName + '=' + dct[searchedName])