#include <bits/stdc++.h>
using namespace std;
const int maxN = 1 << 7;
int n, m;
int a[maxN], b[maxN];
int c[maxN];
int f(int i, int x) {
  if (x == a[i] || x == b[i]) return 0;
  if (a[i] < x && x < b[i]) return 1;
  return 2;
}
bool check(int i, int j) { return f(i, a[j]) + f(i, b[j]) == 3; }
void dfs(int v, int cl) {
  if (c[v]) return;
  c[v] = cl;
  for (int i = 0; i < m; i++) {
    if (check(i, v)) {
      if (c[i] == 0) dfs(i, 3 - cl);
      if (c[v] + c[i] != 3) {
        cout << "Impossible" << endl;
        exit(0);
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    if (a[i] > b[i]) swap(a[i], b[i]);
  }
  for (int i = 0; i < m; i++) {
    dfs(i, max(c[i], 1));
    cout << (c[i] == 1 ? "i" : "o");
  }
  cout << endl;
  return 0;
}
