#include <bits/stdc++.h>
using namespace std;
int n, m, *dfn, *low, T, *pos, cnt;
char *color;
vector<int> *g, ele;
inline int NOT(const int &i) { return (i < m ? i + m : i - m); }
bool *inst;
stack<int> st;
void tarjan(int i) {
  dfn[i] = low[i] = ++T;
  st.push(i);
  inst[i] = 1;
  for (int &j : g[i])
    if (!dfn[j]) {
      tarjan(j);
      low[i] = min(low[i], low[j]);
    } else if (inst[j])
      low[i] = min(low[i], dfn[j]);
  if (dfn[i] == low[i]) {
    while (1) {
      int j = st.top();
      st.pop();
      inst[j] = 0;
      pos[j] = cnt;
      if (i == j) break;
    }
    cnt++;
    ele.push_back(i);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  pair<int, int> *x = new pair<int, int>[m];
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x[i].first, &x[i].second);
    if (x[i].first > x[i].second) swap(x[i].first, x[i].second);
  }
  g = new vector<int>[2 * m];
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++)
      if (i != j && x[j].first < x[i].second && x[j].first > x[i].first &&
          (x[j].second > x[i].second || x[j].second < x[i].first)) {
        g[i].push_back(NOT(j));
        g[NOT(i)].push_back(j);
        g[j].push_back(NOT(i));
        g[NOT(j)].push_back(i);
      }
  dfn = new int[2 * m];
  memset(dfn, 0, 8 * m);
  low = new int[2 * m];
  pos = new int[2 * m];
  inst = new bool[2 * m];
  memset(inst, 0, 2 * m);
  for (int i = 0; i < 2 * m; i++)
    if (!dfn[i]) tarjan(i);
  bool ok = 1;
  for (int i = 0; i < m; i++)
    if (pos[i] == pos[NOT(i)]) {
      ok = 0;
      break;
    }
  if (ok) {
    color = new char[cnt];
    memset(color, -1, cnt);
    for (int i = 0; i < cnt; i++)
      if (!~color[i]) {
        color[i] = 1;
        color[pos[NOT(ele[i])]] = 0;
      } else if (color[i]) {
        for (int &j : g[i])
          if (!color[pos[j]]) {
            ok = 0;
            break;
          }
        if (!ok) break;
      }
  }
  if (ok)
    for (int i = 0; i < m; i++) printf("%c", color[pos[i]] ? 'o' : 'i');
  else
    printf("Impossible");
}
