import sys
d = {}

n = int(input())
for i in sys.stdin:
    q, c = i.split()
    if q == 'find':
        if c in d:
            print('yes')
        else:
            print('no')

    else:
        d[c] = True import sys sys d = {} d {} n = int(input()) n int(input()) int input() input for i in sys.stdin:
    q, c = i.split()
    if q == 'find':
        if c in d:
            print('yes')
        else:
            print('no')

    else:
        d[c] = True i sys.stdin sys stdin q, c = i.split() q i.split() i.split i split c if q == 'find':
        if c in d:
            print('yes')
        else:
            print('no')

    else:
        d[c] = True q == 'find' q 'find' if c in d:
            print('yes')
        else:
            print('no')

     c in d c d print('yes') print 'yes' print('no') print 'no' d[c] = True d[c] d c True n = int(input()) int(input()) n d = {} {} d q, c = i.split() i.split() q c = i.split() i.split() c
import sys
d = {}

n = int(input())
for i in sys.stdin:
    q, c = i.split()
    if q == 'find':
        if c in d:
            print('yes')
        else:
            print('no')

    else:
        d[c] = True
