n = int(input())

added_strings = set()
for i in range(n):
    com, s = input().split()
    if com == 'insert':
        added_strings.add(s)
    elif com == 'find':
        print('yes' if (s in added_strings) else 'no') n = int(input()) n int(input()) int input() input added_strings = set() added_strings set() set for i in range(n):
    com, s = input().split()
    if com == 'insert':
        added_strings.add(s)
    elif com == 'find':
        print('yes' if (s in added_strings) else 'no') i range(n) range n com, s = input().split() com input().split() ().split () input split s if com == 'insert':
        added_strings.add(s)
    elif com == 'find':
        print('yes' if (s in added_strings) else 'no') com == 'insert' com 'insert' added_strings.add(s) added_strings.add added_strings add s elif com == 'find':
        print('yes' if (s in added_strings) else 'no') com == 'find' com 'find' print('yes' if (s in added_strings) else 'no') print 'yes' if (s in added_strings) else 'no' s in added_strings s added_strings 'yes' 'no' s = input().split() input().split() s com, s = input().split() input().split() com added_strings = set() set() added_strings n = int(input()) int(input()) n
n = int(input())

added_strings = set()
for i in range(n):
    com, s = input().split()
    if com == 'insert':
        added_strings.add(s)
    elif com == 'find':
        print('yes' if (s in added_strings) else 'no')
