n = int(input())
myDict = {}

for i in range(n):
    cmd,key = input().split()
    if cmd == "insert":
        myDict.setdefault(key,key)
    else:
        if key in myDict.keys():
            print("yes")
        else:
            print("no") n = int(input()) n int(input()) int input() input myDict = {} myDict {} for i in range(n):
    cmd,key = input().split()
    if cmd == "insert":
        myDict.setdefault(key,key)
    else:
        if key in myDict.keys():
            print("yes")
        else:
            print("no") i range(n) range n cmd,key = input().split() cmd input().split() ().split () input split key if cmd == "insert":
        myDict.setdefault(key,key)
    else:
        if key in myDict.keys():
            print("yes")
        else:
            print("no") cmd == "insert" cmd "insert" myDict.setdefault(key,key) myDict.setdefault myDict setdefault key key if key in myDict.keys():
            print("yes")
        else:
            print("no") key in myDict.keys() key myDict.keys() myDict.keys myDict keys print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n myDict = {} {} myDict key = input().split() input().split() key cmd,key = input().split() input().split() cmd
n = int(input())
myDict = {}

for i in range(n):
    cmd,key = input().split()
    if cmd == "insert":
        myDict.setdefault(key,key)
    else:
        if key in myDict.keys():
            print("yes")
        else:
            print("no")
