It is well known that Berland has *n* cities, which form the Silver ring — cities *i* and *i* + 1 (1 ≤ *i* &lt; *n*) are connected by a road, as well as the cities *n* and 1. The goverment have decided to build *m* new roads. The list of the roads to build was prepared. Each road will connect two cities. Each road should be a curve which lies inside or outside the ring. New roads will have no common points with the ring (except the endpoints of the road).

Now the designers of the constructing plan wonder if it is possible to build the roads in such a way that no two roads intersect (note that the roads may intersect at their endpoints). If it is possible to do, which roads should be inside the ring, and which should be outside?
The first line contains two integers *n* and *m* (4 ≤ *n* ≤ 100, 1 ≤ *m* ≤ 100). Each of the following *m* lines contains two integers *a*<sub class="lower-index">*i*</sub> and *b*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub> ≤ *n*, *a*<sub class="lower-index">*i*</sub> ≠ *b*<sub class="lower-index">*i*</sub>). No two cities will be connected by more than one road in the list. The list will not contain the roads which exist in the Silver ring.
#!/usr/bin/env python3

# Read inputs
(n,m) = map(int, input().split())
roads = []
for i in range(m):
  (a,b) = map(int, input().split())
  a,b = a-1,b-1
  roads.append((min(a,b),max(a,b)))

# Check for incompatibilities between roads
incompatible = [[] for i in range(m)]
for i in range(m):
  (a,b) = roads[i]
  side1 = set(range(a+1,b))
  side2 = set(range(n)).difference(side1)
  for j in range(i+1,m):
    # Check if the roads are compatible
    (a,b) = roads[j]
    compatible = ((a in side1) and (b in side1)) or ((a in side2) and (b in side2))
    if (not compatible):
      incompatible[i].append(j)
      incompatible[j].append(i)

# Decide where the roads should go
decision = [None for i in range(m)]

def update(decision, road_idx, value):
  if (decision[road_idx] == value):
    # Nothing to do
    pass
  elif (decision[road_idx] == (not value)):
    # Problem
    print("Impossible")
    exit()
  else:
    decision[road_idx] = value;
    for other_road in incompatible[road_idx]:
      update(decision, other_road, not value)

for i in range(m):
  if (decision[i] == None):
    # Just pick one
    update(decision, i, True)

output = ["i" if d else "o" for d in decision]
print("".join(output))