You are given an empty dictionary and n queries. Each query can be one of the following two types:
Type 1: Insert a string into the dictionary.
Type 2: Check if a string exists in the dictionary.
Your task is to implement a program that processes these queries efficiently.
For a query of type 2 if the string is present, output Yes, otherwise, output No.
Input
The input consists of multiple lines. The first line contains an integer, q (1 ≤ q ≤ ), representing the number of queries.
The following q lines describe the queries. Each line starts with an integer, type (1 or 2), indicating the type of query.
If type = 1, the line will be followed by a space and a string s (1 ≤ |s| ≤ 1000), representing the string to be inserted into the dictionary. The string consists of lowercase English letters only.
If type = 2, the line will be followed by a space and a string s (1 ≤ |s| ≤ 1000), representing the string to be checked in the dictionary. The string consists of lowercase English letters only.
It is guaranteed that the sum of the lengths of all query strings does not exceed .
Output
For each query of type 2, output Yes if the string is present in the dictionary, otherwise, output No.