#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e2 + 5;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
bool flag = true, mark[maxN];
int a[maxN], b[maxN], hisu[maxN];
vector<int> G[maxN];
bool in(int l, int r, int x, int y) {
  return (l < x && x < r) && (l > y || y > r);
}
void LEVI(int v, bool x = 0) {
  mark[v] = true;
  hisu[v] = x;
  for (int u : G[v]) {
    if (mark[u]) {
      if (hisu[u] == x) flag = false;
    } else
      LEVI(u, !x);
  }
  return;
}
int main() {
  time_t START = clock();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(hisu, -1, sizeof hisu);
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", a + i, b + i);
    if (a[i] > b[i]) swap(a[i], b[i]);
    for (int j = 0; j < i; j++) {
      if (in(a[i], b[i], a[j], b[j]) || in(a[i], b[i], b[j], a[j])) {
        G[i].push_back(j);
        G[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; i++)
    if (!mark[i]) LEVI(i);
  if (!flag)
    printf("Impossible");
  else
    for (int i = 0; i < m; i++) printf("%c", (hisu[i] ? 'i' : 'o'));
  printf("\n");
  time_t FINISH = clock();
  cerr << "Execution time: "
       << (long double)(FINISH - START) / CLOCKS_PER_SEC * 1000.0
       << " milliseconds.\n";
  return 0;
}
