#include <bits/stdc++.h>
using namespace std;
struct Node {
  int v, next;
};
Node E[1000005];
int head[100005 * 2];
int S[100005 * 2];
bool mark[100005 * 2];
int cnt, n, m, NE;
int a[100005], b[100005];
void init() {
  memset((mark), 0, sizeof(mark));
  NE = 0;
  memset(head, -1, sizeof head);
}
void add_edge(int u, int v) {
  E[NE].v = v;
  E[NE].next = head[u];
  head[u] = NE++;
}
bool dfs(int u) {
  if (mark[u ^ 1]) return false;
  if (mark[u]) return true;
  mark[u] = true;
  S[cnt++] = u;
  for (int i = head[u]; i != -1; i = E[i].next)
    if (!dfs(E[i].v)) return false;
  return true;
}
bool solve() {
  for (int i = 0; i < 2 * m; i += 2) {
    if (!mark[i] && !mark[i + 1]) {
      cnt = 0;
      if (!dfs(i)) {
        while (cnt > 0) mark[S[--cnt]] = false;
        if (!dfs(i + 1)) return false;
      }
    }
  }
  return true;
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    init();
    for (int i = (0); i <= (int)(m - 1); i++) {
      scanf("%d%d", &a[i], &b[i]);
      if (a[i] > b[i]) swap(a[i], b[i]);
    }
    for (int i = (0); i <= (int)(m - 1); i++) {
      for (int j = (i + 1); j <= (int)(m - 1); j++) {
        if ((a[j] > a[i] && a[j] < b[i] && b[j] > b[i]) ||
            (a[i] > a[j] && a[i] < b[j] && b[i] > b[j])) {
          add_edge(i << 1, j << 1 | 1);
          add_edge(j << 1, i << 1 | 1);
          add_edge(i << 1 | 1, j << 1);
          add_edge(j << 1 | 1, i << 1);
        }
      }
    }
    if (solve()) {
      for (int i = 0; i < 2 * m; i += 2) printf("%c", mark[i] ? 'o' : 'i');
      printf("\n");
    } else
      printf("Impossible\n");
  }
  return 0;
}
