##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
| # | Title | Points | Solved | Admin | |
|---|---|---|---|---|---|
You are given the complement of a simple undirected graph .
More precisely, the input graph is a graph on vertices .
For every two distinct vertices and , the edge exists in if and only if it does not exist in .
The input graph has no triangle. In other words, there are no three distinct vertices , , and such that all three edges , , and exist in the input graph.
For each test case, find a Hamiltonian path in , or determine that no such path exists.
A Hamiltonian path is an ordering of all vertices such that for every , the edge exists in .
For each test case, if there is no Hamiltonian path in , output
Otherwise, output
where is a Hamiltonian path in .
You may print each letter in any case.
In the complement graph, vertex is isolated, so no Hamiltonian path can use all vertices.
The complement graph has only the edges - and -, so it is disconnected and cannot have a Hamiltonian path.