#include using namespace std; using ll=long long; using pp=pair; #define sr string #define vc vector #define db double #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)n;i++) #define pb push_back #define all(v) v.begin(),v.end() #define pque priority_queue #define bpc(a) __builtin_popcount(a) int main(){ int n;cin>>n; sets; rep(i,n){ sr x;cin>>x; if(s.count(x))cout<<"Yes"; else cout<<"No"; cout<<"\n"; s.insert(x); rep(j,x.size()-1){ auto xx=x; swap(xx[i],xx[i+1]); s.insert(xx); } } }