Manthan, Codefest 17
A
Tom Riddle's Diary
Codeforces
800
原题
←B →
翻译中…

Harry Potter is on a mission to destroy You-Know-Who's Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle's diary. The diary was with Ginny and it forced her to open the Chamber of Secrets. Harry wants to know the different people who had ever possessed the diary to make sure they are not under its influence.

翻译中…

He has names of $*n*$ people who possessed the diary in order. You need to tell, for each person, if he/she possessed the diary at some point before or not.

翻译中…

Formally, for a name $*s*_{*i*}$ in the $*i*$-th line, output "YES" (without quotes) if there exists an index $*j*$ such that $*s*_{*i*} = *s*_{*j*}$ and $*j* < *i*$, otherwise, output "NO" (without quotes).

翻译中…

Input

翻译中…

First line of input contains an integer $*n*$ ($1 ≤ *n* ≤ 100$) — the number of names in the list.

翻译中…

Next $*n*$ lines each contain a string $*s*_{*i*}$, consisting of lowercase English letters. The length of each string is between $1$ and $100$.

翻译中…

Output

翻译中…

Output $*n*$ lines each containing either "YES" or "NO" (without quotes), depending on whether this string was already present in the stream or not.

翻译中…

You can print each letter in any case (upper or lower).

翻译中…

Note

翻译中…

In test case $1$, for $*i* = 5$ there exists $*j* = 3$ such that $*s*_{*i*} = *s*_{*j*}$ and $*j* < *i*$, which means that answer for $*i* = 5$ is "YES".

翻译中…

样例

Input #1
6
tom
lucius
ginny
harry
ginny
harry
Output #1
NO
NO
NO
NO
YES
YES
InputCopy OutputCopy
Input #2
3
a
a
a
Output #2
NO
YES
YES
InputCopy OutputCopy
题目信息
题号
855A
时间限制
2 s
内存限制
256 MB
标签
暴力
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。