#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e2 + 10;
char vis[MAXN], ans[MAXN];
int n, m, sccId = 0, scc[MAXN], from[MAXN], to[MAXN];
vector<int> g[MAXN], gt[MAXN], order;
int neg(int u) { return u ^ 1; }
void add_or(int u, int v) {
  g[neg(u)].push_back(v);
  g[neg(v)].push_back(u);
  gt[v].push_back(neg(u));
  gt[u].push_back(neg(v));
}
void add_xor(int u, int v) {
  add_or(u, v);
  add_or(neg(u), neg(v));
}
bool badMatch(int i, int j) {
  if (from[j] == from[i] || to[j] == to[i]) return false;
  if (from[j] >= to[i] || from[i] >= to[j]) return false;
  if (from[j] <= from[i] && to[i] <= to[j]) return false;
  if (from[i] <= from[j] && to[j] <= to[i]) return false;
  return true;
}
void dfs(int u, bool rev) {
  vis[u] = 1;
  for (int v : (rev ? gt[u] : g[u]))
    if (!vis[v]) dfs(v, rev);
  if (rev)
    scc[u] = sccId;
  else
    order.push_back(u);
}
bool solve2SAT() {
  memset(vis, 0, sizeof(vis));
  for (int u = 0; u < (m << 1); ++u)
    if (!vis[u]) dfs(u, false);
  reverse(order.begin(), order.end());
  memset(vis, 0, sizeof(vis));
  sccId = 0;
  for (int u : order)
    if (!vis[u]) ++sccId, dfs(u, true);
  memset(vis, 0, sizeof(vis));
  for (int u : order)
    if (!vis[u >> 1]) {
      vis[u >> 1] = 1;
      if (scc[u] == scc[neg(u)]) return false;
      ans[u >> 1] = (scc[u] > scc[neg(u)]) ^ (u & 1) ? 'i' : 'o';
    }
  return true;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", from + i, to + i);
    if (to[i] < from[i]) swap(to[i], from[i]);
  }
  for (int i = 0; i < m; ++i)
    for (int j = i + 1; j < m; ++j)
      if (badMatch(i, j)) add_xor(i << 1, j << 1);
  ans[m] = 0;
  if (solve2SAT())
    puts(ans);
  else
    puts("Impossible");
  return 0;
}
