Your task is to write a program of a simple _dictionary_ which implements the following instructions:    * **insert _str_** : insert a string _str_ in to the dictionary   * **find _str_** : if the distionary contains _str_ , then print 'yes', otherwise print 'no'
def main():
    n = int(input())

    repo = []
    for i in range(n):
        line = input()
        if line[0] == 'i':
            if line[7:10] not in repo:
                repo.append(line.split()[1])
        elif line[0] == 'f':
            if line[5:8] in repo:
                print('Yes')
            else:
                print('No')
    return


main()

import sys

def main():
    lines = sys.stdin.readlines()
    n = int(lines[0])

    repo = {}
    for i in range(1, n + 1):
        command, acgt = lines[i].split()
        if command[0] == 'i':
            if acgt not in repo:
                repo[acgt] = 0
        elif command[0] == 'f':
            if acgt in repo:
                print('yes')
            else:
                print('no')
    return


main()
