import sys

D = {}
input()
for line in sys.stdin:
    if line[0] == "f":
        print('yes' if line[5:] in D else 'no')
    else:
        D[line[7:]] = 0
 import sys sys D = {} D {} input() input for line in sys.stdin:
    if line[0] == "f":
        print('yes' if line[5:] in D else 'no')
    else:
        D[line[7:]] = 0 line sys.stdin sys stdin if line[0] == "f":
        print('yes' if line[5:] in D else 'no')
    else:
        D[line[7:]] = 0 line[0] == "f" line[0] line 0 "f" print('yes' if line[5:] in D else 'no') print 'yes' if line[5:] in D else 'no' line[5:] in D line[5:] line 5: 5 D 'yes' 'no' D[line[7:]] = 0 D[line[7:]] D line[7:] line 7: 7 0 D = {} {} D
import sys

D = {}
input()
for line in sys.stdin:
    if line[0] == "f":
        print('yes' if line[5:] in D else 'no')
    else:
        D[line[7:]] = 0

