n = int(input())
  
l = []
s = {}
for i in range(n):
    c, m = input().split()
    if c[0] == 'i':
        s[m] = 0
    elif c[0] == 'f':
        if m in s:
            l.append('yes')
        else:
            l.append('no')
print(*l,sep='\n') n = int(input()) n int(input()) int input() input l = [] l [] s = {} s {} for i in range(n):
    c, m = input().split()
    if c[0] == 'i':
        s[m] = 0
    elif c[0] == 'f':
        if m in s:
            l.append('yes')
        else:
            l.append('no') i range(n) range n c, m = input().split() c input().split() ().split () input split m if c[0] == 'i':
        s[m] = 0
    elif c[0] == 'f':
        if m in s:
            l.append('yes')
        else:
            l.append('no') c[0] == 'i' c[0] c 0 'i' s[m] = 0 s[m] s m 0 elif c[0] == 'f':
        if m in s:
            l.append('yes')
        else:
            l.append('no') c[0] == 'f' c[0] c 0 'f' if m in s:
            l.append('yes')
        else:
            l.append('no') m in s m s l.append('yes') l.append l append 'yes' l.append('no') l.append l append 'no' print(*l,sep='\n') print *l l sep='\n' sep '\n' n = int(input()) int(input()) n s = {} {} s l = [] [] l c, m = input().split() input().split() c m = input().split() input().split() m
n = int(input())
  
l = []
s = {}
for i in range(n):
    c, m = input().split()
    if c[0] == 'i':
        s[m] = 0
    elif c[0] == 'f':
        if m in s:
            l.append('yes')
        else:
            l.append('no')
print(*l,sep='\n')