AIM Tech Round (Div. 1)
A
Graph and String
Codeforces
1800
原题
←B →
翻译中…

One day student Vasya was sitting on a lecture and mentioned a string $*s*_{1}*s*_{2}... *s*_{*n*}$, consisting of letters "a", "b" and "c" that was written on his desk. As the lecture was boring, Vasya decided to complete the picture by composing a graph $*G*$ with the following properties:

翻译中…
  • $*G*$ has exactly $*n*$ vertices, numbered from $1$ to $*n*$.
  • For all pairs of vertices $*i*$ and $*j*$, where $*i* ≠ *j*$, there is an edge connecting them if and only if characters $*s*_{*i*}$ and $*s*_{*j*}$ are either equal or neighbouring in the alphabet. That is, letters in pairs "a"-"b" and "b"-"c" are neighbouring, while letters "a"-"c" are not.
翻译中…

Vasya painted the resulting graph near the string and then erased the string. Next day Vasya's friend Petya came to a lecture and found some graph at his desk. He had heard of Vasya's adventure and now he wants to find out whether it could be the original graph $*G*$, painted by Vasya. In order to verify this, Petya needs to know whether there exists a string $*s*$, such that if Vasya used this $*s*$ he would produce the given graph $*G*$.

翻译中…

Input

翻译中…

The first line of the input contains two integers $*n*$ and $*m*$ image — the number of vertices and edges in the graph found by Petya, respectively.

翻译中…

Each of the next $*m*$ lines contains two integers $*u*_{*i*}$ and $*v*_{*i*}$ $(1 ≤ *u*_{*i*}, *v*_{*i*} ≤ *n*, *u*_{*i*} ≠ *v*_{*i*})$ — the edges of the graph $*G*$. It is guaranteed, that there are no multiple edges, that is any pair of vertexes appear in this list no more than once.

翻译中…

Output

翻译中…

In the first line print "Yes" (without the quotes), if the string $*s*$ Petya is interested in really exists and "No" (without the quotes) otherwise.

翻译中…

If the string $*s*$ exists, then print it on the second line of the output. The length of $*s*$ must be exactly $*n*$, it must consist of only letters "a", "b" and "c" only, and the graph built using this string must coincide with $*G*$. If there are multiple possible answers, you may print any of them.

翻译中…

Note

翻译中…

In the first sample you are given a graph made of two vertices with an edge between them. So, these vertices can correspond to both the same and adjacent letters. Any of the following strings "aa", "ab", "ba", "bb", "bc", "cb", "cc" meets the graph's conditions.

翻译中…

In the second sample the first vertex is connected to all three other vertices, but these three vertices are not connected with each other. That means that they must correspond to distinct letters that are not adjacent, but that is impossible as there are only two such letters: a and c.

翻译中…

样例

Input #1
2 1
1 2
Output #1
Yes
aa
InputCopy OutputCopy
Input #2
4 3
1 2
1 3
1 4
Output #2
No
InputCopy OutputCopy
题目信息
题号
623A
时间限制
2 s
内存限制
256 MB
标签
构造
图论

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