class dictionary:

    def __init__(self):
        self._d = set()

    def insert(self, s):
        self._d.add(s)

    def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':

    dd = dictionary()

    n = int(input())
    for _ in range(n):
        args = input().split()
        if args[0] == "insert":
            dd.insert(args[1])
        elif args[0] == "find":
            dd.find(args[1]) class dictionary:

    def __init__(self):
        self._d = set()

    def insert(self, s):
        self._d.add(s)

    def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no") dictionary def __init__(self):
        self._d = set()

     __init__ self._d = set() self._d self _d set() set self self def insert(self, s):
        self._d.add(s)

     insert self._d.add(s) self._d.add self._d self _d add s self self s s def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no") find if s in self._d:
            print("yes")
        else:
            print("no") s in self._d s self._d self _d print("yes") print "yes" print("no") print "no" self self s s if __name__ == '__main__':

    dd = dictionary()

    n = int(input())
    for _ in range(n):
        args = input().split()
        if args[0] == "insert":
            dd.insert(args[1])
        elif args[0] == "find":
            dd.find(args[1]) __name__ == '__main__' __name__ '__main__' dd = dictionary() dd dictionary() dictionary n = int(input()) n int(input()) int input() input for _ in range(n):
        args = input().split()
        if args[0] == "insert":
            dd.insert(args[1])
        elif args[0] == "find":
            dd.find(args[1]) _ range(n) range n args = input().split() args input().split() ().split () input split if args[0] == "insert":
            dd.insert(args[1])
        elif args[0] == "find":
            dd.find(args[1]) args[0] == "insert" args[0] args 0 "insert" dd.insert(args[1]) dd.insert dd insert args[1] args 1 elif args[0] == "find":
            dd.find(args[1]) args[0] == "find" args[0] args 0 "find" dd.find(args[1]) dd.find dd find args[1] args 1 class dictionary:

    def __init__(self):
        self._d = set()

    def insert(self, s):
        self._d.add(s)

    def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no") class dictionary:

    def __init__(self):
        self._d = set()

    def insert(self, s):
        self._d.add(s)

    def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no") dictionary dd = dictionary() dictionary() dd args = input().split() input().split() args n = int(input()) int(input()) n
class dictionary:

    def __init__(self):
        self._d = set()

    def insert(self, s):
        self._d.add(s)

    def find(self, s):
        if s in self._d:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':

    dd = dictionary()

    n = int(input())
    for _ in range(n):
        args = input().split()
        if args[0] == "insert":
            dd.insert(args[1])
        elif args[0] == "find":
            dd.find(args[1])
