#include <bits/stdc++.h>
using namespace std;
const int maxn = 200;
int n, m, l[maxn], r[maxn], cmp[maxn];
bool vis[maxn];
int dfs(int u, int c) {
  vis[u] = true;
  cmp[u] = c;
  for (int i = 0; i < m; ++i) {
    if (u == i) continue;
    if ((r[i] > r[u] && l[i] < r[u] && l[i] > l[u]) ||
        (l[i] < l[u] && r[i] < r[u] && r[i] > l[u])) {
      if (!vis[i])
        dfs(i, c ^ 1);
      else if (cmp[i] == c) {
        cout << "Impossible\n";
        exit(0);
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> l[i] >> r[i];
    if (r[i] < l[i]) swap(l[i], r[i]);
  }
  for (int i = 0; i < m; ++i)
    if (!vis[i]) dfs(i, 0);
  for (int i = 0; i < m; ++i)
    if (cmp[i])
      cout << 'i';
    else
      cout << 'o';
}
