#include <bits/stdc++.h>
using namespace std;
const int N = 100, M = 100;
struct EDGE {
  int to;
  EDGE *nxt;
  EDGE() {}
  EDGE(int _t, EDGE *_n) : to(_t), nxt(_n) {}
};
struct GRAPH {
  EDGE edg[M * M * 4 + 3], *head[N * 2 + 3], *ncnt;
  GRAPH() { ncnt = edg; }
  void AddEdge(int u, int v) {
    ncnt++;
    *ncnt = EDGE(v, head[u]);
    head[u] = ncnt;
  }
  EDGE *operator[](int id) { return head[id]; }
};
GRAPH Gr;
struct STACK {
  int stk[M * 2 + 3], head;
  int Size() { return head; }
  int Top() { return stk[head]; }
  void Pop() { head--; }
  void Push(int val) { stk[++head] = val; }
};
STACK St;
int n, m, ndfn, nscc;
int lnk[M + 3][2], scc[M * 2 + 3], dfn[M * 2 + 3], low[M * 2 + 3];
bool inst[M * 2 + 3];
void Tarjan(int u) {
  dfn[u] = low[u] = ++ndfn;
  St.Push(u);
  inst[u] = true;
  for (EDGE *it = Gr[u]; it; it = it->nxt) {
    int v = it->to;
    if (!dfn[v])
      Tarjan(v), low[u] = min(low[u], low[v]);
    else if (inst[v])
      low[u] = min(low[u], dfn[v]);
  }
  if (low[u] == dfn[u]) {
    nscc++;
    int cur;
    do {
      cur = St.Top();
      St.Pop();
      scc[cur] = nscc;
      inst[cur] = false;
    } while (cur != u);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &lnk[i][0], &lnk[i][1]);
    if (lnk[i][0] > lnk[i][1]) swap(lnk[i][0], lnk[i][1]);
    for (int j = 0; j < i; j++)
      if ((lnk[j][0] < lnk[i][0] && lnk[i][0] < lnk[j][1] &&
           lnk[j][1] < lnk[i][1]) ||
          (lnk[i][0] < lnk[j][0] && lnk[j][0] < lnk[i][1] &&
           lnk[i][1] < lnk[j][1]))
        Gr.AddEdge(i << 1, j << 1 | 1), Gr.AddEdge(i << 1 | 1, j << 1),
            Gr.AddEdge(j << 1, i << 1 | 1), Gr.AddEdge(j << 1 | 1, i << 1);
  }
  for (int i = 0; i < 2 * m; i++)
    if (!dfn[i]) Tarjan(i);
  for (int i = 0; i < m; i++)
    if (scc[i << 1] == scc[i << 1 | 1]) {
      printf("Impossible\n");
      return 0;
    }
  for (int i = 0; i < m; i++)
    if (scc[i << 1] < scc[i << 1 | 1])
      printf("i");
    else
      printf("o");
  printf("\n");
  return 0;
}
