n = int( raw_input( ) )
dic = set()
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic.add( word )
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" ) n = int( raw_input( ) ) n int( raw_input( ) ) int raw_input( ) raw_input dic = set() dic set() set for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic.add( word )
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" ) i range( n ) range n cmd, word = raw_input( ).split( " " ) cmd raw_input( ).split( " " ) ( ).split ( ) raw_input split " " word if "insert" == cmd:
		dic.add( word )
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" ) "insert" == cmd "insert" cmd dic.add( word ) dic.add dic add word elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" ) "find" == cmd "find" cmd if word in dic:
			print( "yes" )
		else:
			print( "no" ) word in dic word dic print( "yes" ) print "yes" print( "no" ) print "no" n = int( raw_input( ) ) int( raw_input( ) ) n word = raw_input( ).split( " " ) raw_input( ).split( " " ) word dic = set() set() dic cmd, word = raw_input( ).split( " " ) raw_input( ).split( " " ) cmd
n = int( raw_input( ) )
dic = set()
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic.add( word )
	elif "find" == cmd:
		if word in dic:
			print( "yes" )
		else:
			print( "no" )