#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int n, m, part[N], a[N], b[N];
vector<int> e[N];
bool check(int i, int j) {
  int mi = min(a[i], b[i]), ma = max(a[i], b[i]);
  if (a[j] > mi && a[j] < ma && (b[j] < mi || b[j] > ma)) return 1;
  if (b[j] > mi && b[j] < ma && (a[j] < mi || a[j] > ma)) return 1;
  return 0;
}
void dfs(int v, int c) {
  part[v] = c;
  for (auto u : e[v]) {
    if (part[u] == part[v]) {
      cout << "Impossible";
      exit(0);
    }
    if (!part[u]) dfs(u, 3 - c);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a[i] >> b[i];
    for (int j = 1; j < i; j++)
      if (check(i, j)) {
        e[i].push_back(j);
        e[j].push_back(i);
      }
  }
  for (int i = 1; i <= m; i++)
    if (!part[i]) dfs(i, 1);
  for (int i = 1; i <= m; i++) cout << (part[i] == 1 ? "i" : "o");
  return 0;
}
