#include <bits/stdc++.h>
using namespace std;
int N, M, l[110][2], col[110];
bool flag = 1;
void find(int u, int c) {
  if (col[u] != -1) {
    if (col[u] ^ c) flag = 0;
    return;
  }
  col[u] = c;
  for (int v = 1; v <= M; v++)
    if (l[u][0] != l[v][0] && l[u][1] != l[v][1]) {
      if (l[u][0] < l[v][0] && l[v][0] < l[u][1] && l[u][1] < l[v][1])
        find(v, c ^ 1);
      if (l[v][0] < l[u][0] && l[u][0] < l[v][1] && l[v][1] < l[u][1])
        find(v, c ^ 1);
    }
}
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= M; i++) {
    scanf("%d%d", &l[i][0], &l[i][1]);
    if (l[i][0] > l[i][1]) swap(l[i][0], l[i][1]);
  }
  memset(col, -1, sizeof(col[0]) * (M + 3));
  for (int i = 1; i <= M; i++)
    if (col[i] == -1) find(i, 0);
  if (flag)
    for (int i = 1; i <= M; i++) printf("%c", col[i] ? 'i' : 'o');
  else
    printf("Impossible\n");
  return 0;
}
