#include <bits/stdc++.h>
using namespace std;
const int maxn = 220, maxm = 220 * 220;
struct edge {
  int s, t, next;
} e[maxm];
struct vtx {
  int dfn, low, belong, leave;
  bool instack;
} ver[maxn];
int hd[maxn], cnt, ind, sta[maxn], top, bcnt;
void insert(int a, int b) {
  e[cnt].next = hd[a];
  hd[a] = cnt;
  e[cnt].t = b;
  e[cnt].s = a;
  cnt++;
}
vector<int> bcc[maxn];
void tarjanSCC(int u) {
  ver[u].dfn = ver[u].low = ind++;
  ver[u].instack = true;
  sta[top++] = u;
  for (int i = hd[u]; i != -1; i = e[i].next) {
    int v = e[i].t;
    if (!ver[v].dfn) {
      tarjanSCC(v);
      ver[u].low = min(ver[u].low, ver[v].low);
    }
    if (ver[v].instack) ver[u].low = min(ver[u].low, ver[v].dfn);
  }
  if (ver[u].dfn == ver[u].low) {
    bcnt++;
    int j = -1;
    do {
      j = sta[--top];
      ver[j].belong = bcnt;
      bcc[bcnt].push_back(j);
      ver[j].instack = false;
    } while (j != u);
  }
  ver[u].leave = ind;
}
void tarjanInit() {
  memset(hd, -1, sizeof hd);
  memset(ver, 0, sizeof ver);
  ind = top = 1;
  cnt = 0;
}
int ord[maxn];
bool cmp(int i, int j) { return ver[i].leave < ver[j].leave; }
bool twoSat(int n, int *sel) {
  for (int i = 0; i < 2 * n; i++) bcc[i].clear();
  for (int i = 0; i < 2 * n; i++)
    if (!ver[i].dfn) tarjanSCC(i);
  for (int i = 0; i < n; i++)
    if (ver[i * 2].belong == ver[i * 2 + 1].belong) return false;
  for (int i = 0; i < 2 * n; i++) ord[i] = i;
  sort(ord, ord + 2 * n, cmp);
  memset(sel, -1, n * sizeof(int));
  for (int i = 0; i < 2 * n; i++) {
    if (sel[ord[i] >> 1] != -1)
      continue;
    else {
      int c = ver[ord[i]].belong;
      for (int j = 0; j < (int)bcc[c].size(); j++)
        sel[bcc[c][j] >> 1] = (bcc[c][j] & 1);
    }
  }
  return true;
}
bool intersect(int a1, int a2, int b1, int b2) {
  if (a1 > a2) swap(a1, a2);
  if (b1 > b2) swap(b1, b2);
  return a1 == b1 ? 0
                  : (a1 < b1 ? (a2 - b1) * (a2 - b2) < 0
                             : (b2 - a1) * (b2 - a2) < 0);
}
int ans[110];
int main() {
  int n, m, p[110][2];
  scanf("%d%d", &n, &m);
  tarjanInit();
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &p[i][0], &p[i][1]);
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < i; j++) {
      if (intersect(p[i][0], p[i][1], p[j][0], p[j][1])) {
        insert(i * 2, j * 2 + 1);
        insert(i * 2 + 1, j * 2);
        insert(j * 2, i * 2 + 1);
        insert(j * 2 + 1, i * 2);
      }
    }
  }
  if (twoSat(m, ans)) {
    for (int i = 0; i < m; i++) {
      if (ans[i])
        printf("i");
      else
        printf("o");
    }
  } else
    printf("Impossible");
  return 0;
}
