import sys readline=sys.stdin.readline N=int(readline()) se=set() base=1000 mod=(1<<121)-1 for n in range(N): S=readline().rstrip() le=len(S) pow_base=[1] for i in range(le-1): pow_base.append(pow_base[-1]*base%mod) h=sum(ord(S[i])*pow_base[i] for i in range(le))%mod if h in se: ans="Yes" else: ans="No" print(ans) se.add(h) for i in range(le-1): se.add((h-ord(S[i])*pow_base[i]-ord(S[i+1])*pow_base[i+1]+ord(S[i])*pow_base[i+1]+ord(S[i+1])*pow_base[i])%mod)