#include <bits/stdc++.h>
using namespace std;
const int maxn = 205;
const int maxm = maxn * maxn;
const int inf = 0x3f3f3f3f;
int n, m, tol, head[maxn];
struct node {
  int to, next;
} g[maxm];
int instack[maxn], dfn[maxn], low[maxn], top, tim, sta[maxn];
int color[maxn], cnt, vis[maxn];
int x[maxn], y[maxn];
void add(int u, int v) {
  g[tol].to = v;
  g[tol].next = head[u];
  head[u] = tol++;
}
void tarjan(int x) {
  dfn[x] = low[x] = ++tim;
  sta[++top] = x;
  instack[x] = 1;
  for (int i = head[x]; i != -1; i = g[i].next) {
    int id = g[i].to;
    if (!dfn[id]) {
      tarjan(id);
      low[x] = min(low[x], low[id]);
    } else if (instack[id])
      low[x] = min(low[x], dfn[id]);
  }
  if (low[x] == dfn[x]) {
    ++cnt;
    do {
      instack[sta[top]] = 0;
      color[sta[top]] = cnt;
      top--;
    } while (x != sta[top + 1]);
  }
  return;
}
int u[maxn], v[maxn];
bool cross(int x1, int y1, int x2, int y2) {
  if (x2 >= y1 || x1 >= y2) return 1;
  if (x2 >= x1 && y2 <= y1) return 1;
  if (x1 >= x2 && y1 <= y2) return 1;
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  memset(head, -1, sizeof(head));
  tol = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u[i], &v[i]);
    if (v[i] < u[i]) swap(u[i], v[i]);
    for (int j = 1; j < i; j++) {
      if (!cross(u[i], v[i], u[j], v[j])) {
        add(i, j + m);
        add(i + m, j);
        add(j, i + m);
        add(j + m, i);
      }
    }
  }
  for (int i = 1; i <= m * 2; i++)
    if (!dfn[i]) tarjan(i);
  for (int i = 1; i <= m; i++) {
    if (color[i] == color[i + m]) {
      printf("Impossible\n");
      return 0;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (color[i] < color[i + m])
      printf("o");
    else
      printf("i");
  }
  return 0;
}
