#include <bits/stdc++.h>
using namespace std;
const int MN = 1e4 + 20;
vector<int> adj[MN], topo;
vector<pair<int, int>> edge;
int scc, st, s[MN], h[MN], t[MN];
bool os[MN];
stack<int> ms;
int n, m;
void add(int u, int v) {
  adj[u + m].push_back(v);
  adj[v + m].push_back(u);
  adj[u].push_back(v + m);
  adj[v].push_back(u + m);
}
void dfs(int v) {
  os[v] = 1;
  s[v] = h[v] = ++st;
  ms.push(v);
  for (int i : adj[v]) {
    if (!s[i]) dfs(i);
    if (os[i]) h[v] = min(h[v], h[i]);
  }
  if (h[v] == s[v]) {
    for (int i = ms.top();; i = ms.top()) {
      ms.pop();
      os[i] = 0;
      h[i] = h[v];
      t[i] = topo.size();
      if (i == v) break;
    }
    scc++;
    topo.push_back(h[v]);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    if (v > u) swap(u, v);
    for (int j = 0; j < i; j++) {
      if (u == edge[j].first || u == edge[j].second || v == edge[j].first ||
          v == edge[j].second)
        continue;
      if ((u < edge[j].first && u > edge[j].second) ^
          (v < edge[j].first && v > edge[j].second))
        add(i, j);
    }
    edge.push_back({u, v});
  }
  for (int i = 0; i < 2 * m; i++)
    if (!s[i]) dfs(i);
  reverse(topo.begin(), topo.end());
  for (int i = 0; i < m; i++) {
    if (h[i] == h[i + m]) return cout << "Impossible", 0;
  }
  for (int i = 0; i < m; i++) {
    t[i] < t[i + m] ? cout << "i" : cout << "o";
  }
  return 0;
}
