• + 1 comment

    code in python

    n = int(input().strip())
    my_contact = {}
    
    # Store contacts
    for _ in range(n):
        name, number = input().strip().split()
        my_contact[name.lower()] = int(number)
    
    # Search contacts until EOF (End of Input)
    try:
        while True:
            search_name = input().strip()
            key = search_name.lower()
            if key in my_contact:
                print(f"{search_name}={my_contact[key]}")
            else:
                print("Not found")
    except EOFError:
        pass