/* ID: 1292871202 LANG: C++ */ #pragma comment(linker,"/STACK:102400000,102400000") #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAX = 0x7fffffff; const ll LINF = 0x3f3f3f3f3f3f3f3fLL; const ll LMAX = 0x7fffffffffffffffLL; const double eps = 1e-9; const double pi=acos(-1.0); const int maxn = 100000+5; const int maxm = 100000+5; const int mod = 1e9+7; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 struct node { int num; node* next[26]; node() { num=0; for(int i=0; i<26; ++i) next[i]=NULL; } }; node *root; void insert(char s[]) { int len=strlen(s); node *p=root; for(int i=0; inext[s[i]-'a']==NULL) p->next[s[i]-'a']=new node(); p=p->next[s[i]-'a']; p->num++; } } int query(char s[]) { int len=strlen(s); node *p=root; for(int i=0; inext[s[i]-'a']==NULL) return 0; p=p->next[s[i]-'a']; } return p->num; } void del(char s[]) { int num = query(s); if(num==0) return; int len=strlen(s); node*p=root; for(int i=0; inext[s[i]-'a']; p->num-=num; } for(int i=0;i<26;++i) { p->next[i]=NULL; } } int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); //cin.sync_with_stdio(false); //cout.sync_with_stdio(false); int n; while(scanf("%d",&n)!=EOF) { char op[10],s[400]; root=new node(); for(int i=0; i0) printf("Yes\n"); else printf("No\n"); } } } return 0; }