dic = set()
n = int(input())
for i in range(n):
    cmd, val = input().split()
    if cmd == "insert":
        dic.add(val)
    elif cmd == "find":
        print("yes" if val in dic else "no")
    else:
        print("wrong command") dic = set() dic set() set n = int(input()) n int(input()) int input() input for i in range(n):
    cmd, val = input().split()
    if cmd == "insert":
        dic.add(val)
    elif cmd == "find":
        print("yes" if val in dic else "no")
    else:
        print("wrong command") i range(n) range n cmd, val = input().split() cmd input().split() ().split () input split val if cmd == "insert":
        dic.add(val)
    elif cmd == "find":
        print("yes" if val in dic else "no")
    else:
        print("wrong command") cmd == "insert" cmd "insert" dic.add(val) dic.add dic add val elif cmd == "find":
        print("yes" if val in dic else "no")
     cmd == "find" cmd "find" print("yes" if val in dic else "no") print "yes" if val in dic else "no" val in dic val dic "yes" "no" print("wrong command") print "wrong command" val = input().split() input().split() val n = int(input()) int(input()) n dic = set() set() dic cmd, val = input().split() input().split() cmd
dic = set()
n = int(input())
for i in range(n):
    cmd, val = input().split()
    if cmd == "insert":
        dic.add(val)
    elif cmd == "find":
        print("yes" if val in dic else "no")
    else:
        print("wrong command")
