n = int( raw_input( ) )
dic = {}
output = []
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic[ word ] = True
	elif "find" == cmd:
		if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" )

print( "\n".join( output ) ) n = int( raw_input( ) ) n int( raw_input( ) ) int raw_input( ) raw_input dic = {} dic {} output = [] output [] for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic[ word ] = True
	elif "find" == cmd:
		if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" ) i range( n ) range n cmd, word = raw_input( ).split( " " ) cmd raw_input( ).split( " " ) ( ).split ( ) raw_input split " " word if "insert" == cmd:
		dic[ word ] = True
	elif "find" == cmd:
		if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" ) "insert" == cmd "insert" cmd dic[ word ] = True dic[ word ] dic word True elif "find" == cmd:
		if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" ) "find" == cmd "find" cmd if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" ) not dic.get( word ) dic.get( word ) dic.get dic get word output.append( "no" ) output.append output append "no" output.append( "yes" ) output.append output append "yes" print( "\n".join( output ) ) print "\n".join( output ) "\n".join "\n" join output dic = {} {} dic n = int( raw_input( ) ) int( raw_input( ) ) n output = [] [] output word = raw_input( ).split( " " ) raw_input( ).split( " " ) word cmd, word = raw_input( ).split( " " ) raw_input( ).split( " " ) cmd
n = int( raw_input( ) )
dic = {}
output = []
for i in range( n ):
	cmd, word = raw_input( ).split( " " )
	if "insert" == cmd:
		dic[ word ] = True
	elif "find" == cmd:
		if not dic.get( word ):
			output.append( "no" )
		else:
			output.append( "yes" )

print( "\n".join( output ) )