#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e2 + 11;
int par[maxn], u[maxn], v[maxn], ans[maxn], n, m;
int find(int u) { return (u == par[u]) ? u : (par[u] = find(par[u])); }
void gahjdf(int p, int q) { par[find(p)] = find(q); }
char o[] = "io";
void no() {
  puts("Impossible\n");
  exit(0);
}
bool conflict(int i, int j) {
  if (u[i] == u[j] or v[i] == v[j] or u[i] == v[j] or v[i] == u[j]) return 0;
  return (u[i] > u[j] and u[i] < v[j]) ^ (v[i] > u[j] and v[i] < v[j]);
}
int main() {
  iota(par, par + maxn, 0);
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", u + i, v + i);
    if (u[i] > v[i]) swap(u[i], v[i]);
  }
  for (int i = 0; i < m; i++)
    for (int j = i + 1; j < m; j++) {
      if (conflict(i, j)) {
        gahjdf(i << 1, j << 1 | 1);
        gahjdf(j << 1, i << 1 | 1);
      }
    }
  bool ok = 1;
  for (int i = 0; i < 2 * m; i += 2)
    if (find(i) == find(i ^ 1)) ok = 0;
  if (!ok) no();
  memset(ans, -1, sizeof ans);
  for (int i = 0; i < 2 * m; i += 2) {
    if (ans[find(i)] == -1) {
      ans[find(i)] = 0;
    }
    ans[find(i ^ 1)] = ans[find(i)] ^ 1;
    putchar(o[ans[find(i)]]);
  }
  puts("");
}
