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.
def is_between(edge, c):
    if c>edge[0] and c<edge[1]:
        return True
    else:
        return False

if __name__ == "__main__":
    answer = []
    imposible = False
    ins = []
    outs = []

    n, m = map(int, input().split())

    for i in range(m):
        a, b = map(int, input().split())
        if(i==0):
            answer.append('i')
            if(a<b):
                ins.append((a,b))
            else:
                ins.append((b,a))

        else:
            is_inside = True
            is_outside = False

            for item in ins:
                if not( (is_between(item, a) and is_between(item, b)) or
                (not is_between(item, a) and not is_between(item, b)) ):
                    is_inside = False
                    is_outside = True
                    break
            if(is_inside):
                answer.append('i')
                if(a<b):
                    ins.append((a,b))
                else:
                    ins.append((b,a))
            else:
                for item in outs:
                    if not( (is_between(item, a) and is_between(item, b)) or
                    (not is_between(item, a) and not is_between(item, b)) ):
                        is_outside = False
                        break
                if(is_outside):
                    answer.append('o')
                    if(a<b):
                        outs.append((a,b))
                    else:
                        outs.append((b,a))
                else:
                    imposible = True
                    break

    if(imposible):
        print("Impossible")
    else:
        for ans in answer:
            print(ans, end='')