from sys import stdin

n = int(stdin.readline())

d = {}
for i in range(n):
    cmd = stdin.readline()
    if cmd.startswith('insert'):
        s = cmd[7:-1]
        d[s] = True
    elif cmd.startswith('find'):
        s = cmd[5:-1]
        print('yes' if s in d else 'no') from sys import stdin n = int(stdin.readline()) n int(stdin.readline()) int stdin.readline() stdin.readline stdin readline d = {} d {} for i in range(n):
    cmd = stdin.readline()
    if cmd.startswith('insert'):
        s = cmd[7:-1]
        d[s] = True
    elif cmd.startswith('find'):
        s = cmd[5:-1]
        print('yes' if s in d else 'no') i range(n) range n cmd = stdin.readline() cmd stdin.readline() stdin.readline stdin readline if cmd.startswith('insert'):
        s = cmd[7:-1]
        d[s] = True
    elif cmd.startswith('find'):
        s = cmd[5:-1]
        print('yes' if s in d else 'no') cmd.startswith('insert') cmd.startswith cmd startswith 'insert' s = cmd[7:-1] s cmd[7:-1] cmd 7:-1 7 -1 d[s] = True d[s] d s True elif cmd.startswith('find'):
        s = cmd[5:-1]
        print('yes' if s in d else 'no') cmd.startswith('find') cmd.startswith cmd startswith 'find' s = cmd[5:-1] s cmd[5:-1] cmd 5:-1 5 -1 print('yes' if s in d else 'no') print 'yes' if s in d else 'no' s in d s d 'yes' 'no' cmd = stdin.readline() stdin.readline() cmd s = cmd[7:-1] cmd[7:-1] s n = int(stdin.readline()) int(stdin.readline()) n d = {} {} d s = cmd[5:-1] cmd[5:-1] s
from sys import stdin

n = int(stdin.readline())

d = {}
for i in range(n):
    cmd = stdin.readline()
    if cmd.startswith('insert'):
        s = cmd[7:-1]
        d[s] = True
    elif cmd.startswith('find'):
        s = cmd[5:-1]
        print('yes' if s in d else 'no')
