Innokenty is a president of a new football league in Byteland. The first task he should do is to assign short names to all clubs to be shown on TV next to the score. Of course, the short names should be distinct, and Innokenty wants that all short names consist of **three letters**.
Each club's full name consist of two words: the team's name and the hometown's name, for example, "_DINAMO BYTECITY_". Innokenty doesn't want to assign strange short names, so he wants to choose such short names for each club that:
1. the short name is the same as three first letters of the team's name, for example, for the mentioned club it is "_DIN_",
2. or, the first two letters of the short name should be the same as the first two letters of the team's name, while the third letter is the same as the first letter in the hometown's name. For the mentioned club it is "_DIB_".
Apart from this, there is a rule that if for some club _x_ the second option of short name is chosen, then there should be no club, for which the first option is chosen which is the same as the first option for the club _x_. For example, if the above mentioned club has short name "_DIB_", then no club for which the first option is chosen can have short name equal to "_DIN_". However, it is possible that some club have short name "_DIN_", where "_DI_" are the first two letters of the team's name, and "_N_" is the first letter of hometown's name. Of course, no two teams can have the same short name.
Help Innokenty to choose a short name for each of the teams. If this is impossible, report that. If there are multiple answer, any of them will suit Innokenty. If for some team the two options of short name are equal, then Innokenty will formally think that only one of these options is chosen.
## Input
The first line contains a single integer _n_ (1 ≤ _n_ ≤ 1000) — the number of clubs in the league.
Each of the next _n_ lines contains two words — the team's name and the hometown's name for some club. Both team's name and hometown's name consist of uppercase English letters and have length at least 3 and at most 20.
## Output
It it is not possible to choose short names and satisfy all constraints, print a single line "_NO_".
Otherwise, in the first line print "_YES_". Then print _n_ lines, in each line print the chosen short name for the corresponding club. Print the clubs in the same order as they appeared in input.
If there are multiple answers, print any of them.
[samples]
## Note
In the first sample Innokenty can choose first option for both clubs.
In the second example it is not possible to choose short names, because it is not possible that one club has first option, and the other has second option if the first options are equal for both clubs.
In the third example Innokenty can choose the second options for the first two clubs, and the first option for the third club.
In the fourth example note that it is possible that the chosen short name for some club _x_ is the same as the first option of another club _y_ if the first options of _x_ and _y_ are different.
Innokenty 是 Byteland 一个新足球联赛的主席。他需要为所有俱乐部分配简短名称,以便在电视上与比分一起显示。当然,这些简短名称必须互不相同,且 Innokenty 希望所有简短名称均由 *三个字母* 组成。
每个俱乐部的全名由两个单词组成:球队名称和家乡名称,例如 "_DINAMO BYTECITY_"。Innokenty 不希望分配奇怪的简短名称,因此他希望为每个俱乐部选择这样的简短名称:
此外,还有一条规则:如果某个俱乐部 #cf_span[x] 选择了第二个简短名称选项,则不存在任何其他俱乐部,其第一个选项与俱乐部 #cf_span[x] 的第一个选项相同。例如,如果上述俱乐部的简短名称为 "_DIB_",则任何选择第一个选项的俱乐部都不能具有 "_DIN_" 作为其简短名称。然而,可能存在某个俱乐部的简短名称为 "_DIN_",其中 "_DI_" 是球队名称的前两个字母,"_N_" 是家乡名称的第一个字母。当然,没有任何两个球队可以拥有相同的简短名称。
帮助 Innokenty 为每个球队选择一个简短名称。如果不可能,请报告出来。如果有多个答案,任选其一即可。如果某个球队的两个选项相同,则 Innokenty 会形式上认为只选择了一个选项。
第一行包含一个整数 #cf_span[n](#cf_span[1 ≤ n ≤ 1000])— 联赛中的俱乐部数量。
接下来的 #cf_span[n] 行,每行包含两个单词 — 某个俱乐部的球队名称和家乡名称。球队名称和家乡名称均由大写英文字母组成,长度至少为 #cf_span[3],至多为 #cf_span[20]。
如果无法选择满足所有约束的简短名称,请打印一行 "_NO_"。
否则,在第一行打印 "_YES_",然后打印 #cf_span[n] 行,每行打印对应俱乐部的选定简短名称。输出顺序应与输入顺序一致。
如果有多个答案,输出任意一个即可。
在第一个样例中,Innokenty 可以为两个俱乐部都选择第一个选项。
在第二个例子中,不可能选择简短名称,因为如果两个俱乐部的第一个选项相同,则不允许一个俱乐部选择第一个选项,而另一个选择第二个选项。
在第三个例子中,Innokenty 可以为前两个俱乐部选择第二个选项,为第三个俱乐部选择第一个选项。
在第四个例子中,请注意,如果俱乐部 #cf_span[x] 和俱乐部 #cf_span[y] 的第一个选项不同,则俱乐部 #cf_span[x] 的选定简短名称可以与俱乐部 #cf_span[y] 的第一个选项相同。
## Input
第一行包含一个整数 #cf_span[n](#cf_span[1 ≤ n ≤ 1000])— 联赛中的俱乐部数量。接下来的 #cf_span[n] 行,每行包含两个单词 — 某个俱乐部的球队名称和家乡名称。球队名称和家乡名称均由大写英文字母组成,长度至少为 #cf_span[3],至多为 #cf_span[20]。
## Output
如果无法选择满足所有约束的简短名称,请打印一行 "_NO_"。否则,在第一行打印 "_YES_",然后打印 #cf_span[n] 行,每行打印对应俱乐部的选定简短名称。输出顺序应与输入顺序一致。如果有多个答案,输出任意一个即可。
[samples]
## Note
在第一个样例中,Innokenty 可以为两个俱乐部都选择第一个选项。在第二个例子中,不可能选择简短名称,因为如果两个俱乐部的第一个选项相同,则不允许一个俱乐部选择第一个选项,而另一个选择第二个选项。在第三个例子中,Innokenty 可以为前两个俱乐部选择第二个选项,为第三个俱乐部选择第一个选项。在第四个例子中,请注意,如果俱乐部 #cf_span[x] 和俱乐部 #cf_span[y] 的第一个选项不同,则俱乐部 #cf_span[x] 的选定简短名称可以与俱乐部 #cf_span[y] 的第一个选项相同。
**Definitions**
Let $ n \in \mathbb{Z} $ be the number of clubs.
For each club $ i \in \{1, \dots, n\} $, let:
- $ T_i $ be the team name (string of uppercase letters, $ 3 \leq |T_i| \leq 20 $),
- $ H_i $ be the hometown name (string of uppercase letters, $ 3 \leq |H_i| \leq 20 $).
Define two candidate short names for club $ i $:
- $ A_i = T_i[1:3] $ (first three letters of team name),
- $ B_i = T_i[1:2] + H_i[1] $ (first two letters of team name + first letter of hometown name).
Let $ S_i \in \{A_i, B_i\} $ be the chosen short name for club $ i $.
**Constraints**
1. All chosen short names must be distinct:
$$
\forall i \neq j, \quad S_i \neq S_j
$$
2. **Exclusive constraint**: If $ S_i = B_i $, then for all $ j \neq i $, it must hold that $ S_j \neq A_i $.
That is:
$$
\forall i, \quad S_i = B_i \implies \forall j \neq i, \; S_j \neq A_i
$$
3. If $ A_i = B_i $, then only one option exists: $ S_i = A_i = B_i $.
**Objective**
Find an assignment $ S_1, \dots, S_n $ satisfying all constraints, or determine that no such assignment exists.
If possible, output "YES" followed by the $ n $ chosen short names.
Otherwise, output "NO".