#include <bits/stdc++.h>
using namespace std;
int a[105][105];
int n, m;
int x[105], y[105];
int color[105];
int fail = 0;
void bfs(int v, int c) {
  color[v] = c;
  for (int i = 0; i < m; i++) {
    if (a[v][i] && (color[i] == -1))
      bfs(i, 1 - c);
    else {
      if (a[v][i] && (color[i] == color[v])) {
        fail = 1;
        return;
      }
    }
    if (fail) return;
  }
}
int main(void) {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i]--, y[i]--;
    if (x[i] > y[i]) swap(x[i], y[i]);
  }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++)
      if (((x[i] <= x[j]) && y[j] <= y[i]) ||
          ((x[j] <= x[i]) && (y[i] <= y[j])) || (y[i] <= x[j]) ||
          (y[j] <= x[i]))
        ;
      else {
        a[i][j] = 1;
        a[j][i] = 1;
      }
  memset(color, -1, sizeof(color));
  for (int i = 0; i < m; i++) {
    if (color[i] == -1) bfs(i, 0);
    if (fail) {
      printf("Impossible\n");
      return 0;
    }
  }
  for (int i = 0; i < m; i++)
    if (color[i] == 0)
      printf("o");
    else {
      printf("i");
    }
  printf("\n");
  return 0;
}
