#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int maxn = 110;
int fr[maxn], to[maxn];
vector<int> a[maxn];
bool btw(int x, int y, int z) { return x < y && y < z; }
int col[maxn];
bool ok = true;
void dfs(int v, int c) {
  if (col[v]) {
    if (col[v] != c) ok = false;
    return;
  }
  col[v] = c;
  for (int i = 0; i < int((a[v]).size()); ++i) dfs(a[v][i], 3 - c);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &fr[i], &to[i]);
    fr[i]--;
    to[i]--;
    if (fr[i] > to[i]) swap(fr[i], to[i]);
  }
  for (int i = 0; i < m; ++i)
    for (int j = i + 1; j < m; ++j) {
      if (fr[i] == fr[j] || fr[i] == to[j] || to[i] == fr[j] || to[i] == to[j])
        continue;
      if ((btw(fr[i], fr[j], to[i]) ^ btw(fr[i], to[j], to[i])) ||
          (btw(fr[j], fr[i], to[j]) ^ btw(fr[j], to[i], to[j])))
        a[i].push_back(j), a[j].push_back(i);
    }
  for (int i = 0; i < m; ++i)
    if (col[i] == 0) dfs(i, 1);
  if (!ok)
    printf("Impossible\n");
  else
    for (int i = 0; i < m; ++i) printf(col[i] == 1 ? "i" : "o");
  return 0;
}
