#include <bits/stdc++.h>
using namespace std;
const int max_N = 100 + 10;
int n, m, a[max_N], b[max_N], c[max_N];
bool mark[max_N];
vector<int> adj[max_N];
bool dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < (int)adj[v].size(); i++) {
    int u = adj[v][i];
    if (!mark[u]) {
      c[u] = 1 - c[v];
      if (!dfs(u)) return false;
    } else if (c[u] != 1 - c[v])
      return false;
  }
  return true;
}
bool dfs_all() {
  bool ret = true;
  for (int i = 0; i < m; i++) {
    if (!mark[i]) ret &= dfs(i);
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  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++) {
    for (int j = i + 1; j < m; j++) {
      if (a[i] < a[j] && a[j] < b[i] && b[j] > b[i])
        adj[i].push_back(j), adj[j].push_back(i);
      else if (a[j] < a[i] && a[i] < b[j] && b[i] > b[j])
        adj[i].push_back(j), adj[j].push_back(i);
    }
  }
  if (!dfs_all())
    cout << "Impossible\n";
  else {
    for (int i = 0; i < m; i++) {
      if (c[i])
        cout << 'o';
      else
        cout << 'i';
    }
  }
  return 0;
}
