#include <bits/stdc++.h>
using namespace std;
struct SAT {
  int n;
  vector<vector<int>> adj;
  vector<int> ans;
  SAT(int _n) : n(_n), adj(2 * n) {}
  int add_var() {
    adj.emplace_back();
    adj.emplace_back();
    return n++;
  }
  void either(int a, int b) {
    a = max(2 * a, -1 - 2 * a);
    b = max(2 * b, -1 - 2 * b);
    adj[a].push_back(b ^ 1);
    adj[b].push_back(a ^ 1);
  }
  void set_value(int x) { either(x, x); }
  void at_most_one(const vector<int> &li) {
    if ((int)li.size() <= 1) return;
    int cur = ~li[0];
    for (int i = 2; i < (int)li.size(); i++) {
      int next = add_var();
      either(cur, ~li[i]);
      either(cur, next);
      either(~li[i], next);
      cur = ~next;
    }
    either(cur, ~li[1]);
  }
  vector<int> val, comp, z;
  int time = 0;
  int dfs(int u) {
    int low = val[u] = ++time, x;
    z.push_back(u);
    for (int v : adj[u])
      if (!comp[v]) low = min(low, val[v] ?: dfs(v));
    if (low == val[u]) do {
        x = z.back();
        z.pop_back();
        comp[x] = low;
        if (ans[x >> 1] == -1) ans[x >> 1] = x & 1;
      } while (x != u);
    return val[u] = low;
  }
  bool solve() {
    ans.assign(n, -1);
    val.assign(2 * n, 0);
    comp = val;
    for (int i = 0; i < 2 * n; i++)
      if (!comp[i]) dfs(i);
    for (int i = 0; i < n; i++)
      if (comp[2 * i] == comp[2 * i + 1]) return false;
    return true;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  SAT sat(m);
  auto inside = [&](int a, int b, int c) { return a < c && c < b; };
  vector<pair<int, int>> conn;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    for (int j = 0; j < (int)conn.size(); j++) {
      if (a == conn[j].first || b == conn[j].second) continue;
      if (inside(a, b, conn[j].first) != inside(a, b, conn[j].second)) {
        sat.either(i, j);
        sat.either(~i, ~j);
      }
    }
    conn.push_back({a, b});
  }
  if (!sat.solve())
    cout << "Impossible\n";
  else {
    for (int i = 0; i < m; i++) {
      cout << (sat.ans[i] ? 'i' : 'o');
    }
    cout << '\n';
  }
}
