#include <bits/stdc++.h>
using namespace std;
int adj[101][101], col[101];
bool dfs(int u, int color = 1) {
  col[u] = color;
  bool ok = true;
  for (int i = 1; i <= 100; i++) {
    if (adj[u][i] && col[i] == color) return false;
    if (adj[u][i] && !col[i]) {
      ok &= dfs(i, color == 1 ? 2 : 1);
    }
  }
  return ok;
}
int main(void) {
  int s[101], e[101], which[101], n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", s + i, e + i);
    if (s[i] > e[i]) swap(s[i], e[i]);
    for (int j = 0; j < i; j++) {
      bool cross = true;
      for (int c = 0; c < 2; c++) {
        if ((s[i] > s[j] && s[i] < e[j]) && (e[i] > e[j] || e[i] < s[j]))
          cross = false;
        swap(s[i], e[i]);
      }
      if (!cross) adj[i][j] = adj[j][i] = 1;
    }
  }
  memset(col, 0, sizeof col);
  for (int i = 0; i < m; i++) {
    if (!col[i]) {
      bool ok = dfs(i);
      if (!ok) {
        puts("Impossible");
        return 0;
      }
    }
  }
  for (int i = 0; i < m; i++) printf("%c", col[i] == 1 ? 'i' : 'o');
  puts("");
  return 0;
}
