Let there be a simple graph with `N` vertices but we just know the degree of each vertex. Is it possible to reconstruct the graph only by these information?

A simple graph is an undirected graph that has no loops (edges connected at both ends to the same vertex) and no more than one edge between any two different vertices. The degree of a vertex is the number of edges that connect to it.

There are multiple cases. Each case contains two lines. The first line contains one integer `N` (2 ≤ `N` ≤ 100), the number of vertices in the graph. The second line conrains `N` integers in which the i_{th} item is the degree of i_{th} vertex and each degree is between 0 and `N-1`(inclusive).

If the graph can be uniquely determined by the vertex degree information, output "UNIQUE" in the first line. Then output the graph.

If there are two or more different graphs can induce the same degree for all vertices, output "MULTIPLE" in the first line. Then output two different graphs in the following lines to proof.

If the vertex degree sequence cannot deduced any graph, just output "IMPOSSIBLE".

The output format of graph is as follows:

N E uWhere_{1}u_{2}... u_{E}v_{1}v_{2}... v_{E}

提交代码