PROGRAMMING:Graph coloring problem
Graph coloring problem is a famous NP complete problem. Given the undirected graph $$g = (V, e) $$, can we use $$k $$colors to assign a color to each vertex in $$V $$so that no two adjacent vertices have the same color?
But this problem is not for you to solve this coloring problem, but for a given color assignment, please judge whether it is a solution of graph coloring problem.
###Input format:
Enter three integers in the first line, $$V $$($$0 < V / Le 500 $$), $$e $$($$Ge 0 $$) and $$k $$($$0 < K / Le V $$), which are the number of vertices, the number of edges, and the number of colors of the undirected graph. Vertices and colors are numbered from 1 to $$V $. This is followed by the $$e $$lines, each of which gives the number of the two endpoints of an edge. After the information of the graph is given, a positive integer, $$n $$($$Le 20 $$), is given, which is the number of color distribution schemes to be checked. The next $$n $$line gives the color of the $$V $$vertex in turn (the $$I $$number represents the color of the $$I $$vertex), and the numbers are separated by spaces. The problem guarantees that the given undirected graph is legal (that is, there are no self loops and double edges).
###Output format:
For each color assignment scheme, if it is a solution of graph coloring problem, output 'yes', otherwise output' no ', each sentence occupies one line.
###Input example:
```in
6 8 3
2 1
1 3
4 6
2 5
2 4
5 4
5 6
3 6
four
1 2 3 3 1 2
4 5 6 6 4 5
1 2 3 4 5 6
2 3 4 2 3 4
```
###Output example:
```out
Yes
Yes
No
No
```
answer:If there is no answer, please comment
But this problem is not for you to solve this coloring problem, but for a given color assignment, please judge whether it is a solution of graph coloring problem.
###Input format:
Enter three integers in the first line, $$V $$($$0 < V / Le 500 $$), $$e $$($$Ge 0 $$) and $$k $$($$0 < K / Le V $$), which are the number of vertices, the number of edges, and the number of colors of the undirected graph. Vertices and colors are numbered from 1 to $$V $. This is followed by the $$e $$lines, each of which gives the number of the two endpoints of an edge. After the information of the graph is given, a positive integer, $$n $$($$Le 20 $$), is given, which is the number of color distribution schemes to be checked. The next $$n $$line gives the color of the $$V $$vertex in turn (the $$I $$number represents the color of the $$I $$vertex), and the numbers are separated by spaces. The problem guarantees that the given undirected graph is legal (that is, there are no self loops and double edges).
###Output format:
For each color assignment scheme, if it is a solution of graph coloring problem, output 'yes', otherwise output' no ', each sentence occupies one line.
###Input example:
```in
6 8 3
2 1
1 3
4 6
2 5
2 4
5 4
5 6
3 6
four
1 2 3 3 1 2
4 5 6 6 4 5
1 2 3 4 5 6
2 3 4 2 3 4
```
###Output example:
```out
Yes
Yes
No
No
```
answer:If there is no answer, please comment