#include <bits/stdc++.h>
using namespace std;
const int MAXN = 20015;
vector<int> G[2 * MAXN], GI[2 * MAXN], order;
int ssc[2 * MAXN], cssc;
bool check[2 * MAXN];
int n, m, v1, v2;
inline int Neg(int v) { return v + m; }
void dfs1(int x) {
  check[x] = 1;
  for (int i = 0; i < (int)G[x].size(); i++) {
    if (!check[G[x][i]]) {
      dfs1(G[x][i]);
    }
  }
  order.push_back(x);
}
void dfs2(int x, int cssc) {
  ssc[x] = cssc;
  for (int i = 0; i < (int)GI[x].size(); i++) {
    if (!ssc[GI[x][i]]) {
      dfs2(GI[x][i], cssc);
    }
  }
}
char s1[1000];
pair<int, int> ed[105];
int main() {
  cin >> n >> m;
  cssc = 0;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    ed[i].first = min(x, y);
    ed[i].second = max(x, y);
  }
  for (int i = 1; i <= m; i++)
    for (int j = i + 1; j <= m; j++) {
      if (ed[j].first == ed[i].first || ed[j].first == ed[i].second) continue;
      if (ed[j].second == ed[i].first || ed[j].second == ed[i].second) continue;
      if ((ed[j].first > ed[i].first && ed[j].first < ed[i].second) &&
          !(ed[j].second >= ed[i].first && ed[j].second <= ed[i].second)) {
        G[i].push_back(Neg(j));
        G[j].push_back(Neg(i));
        GI[Neg(j)].push_back(i);
        GI[Neg(i)].push_back(j);
        GI[i].push_back(Neg(j));
        GI[j].push_back(Neg(i));
        G[Neg(j)].push_back(i);
        G[Neg(i)].push_back(j);
      }
      if (!(ed[j].first >= ed[i].first && ed[j].first <= ed[i].second) &&
          (ed[j].second > ed[i].first && ed[j].second < ed[i].second)) {
        G[i].push_back(Neg(j));
        G[j].push_back(Neg(i));
        GI[Neg(j)].push_back(i);
        GI[Neg(i)].push_back(j);
        GI[i].push_back(Neg(j));
        GI[j].push_back(Neg(i));
        G[Neg(j)].push_back(i);
        G[Neg(i)].push_back(j);
      }
    }
  for (int i = 1; i <= 2 * m; i++)
    if (!check[i]) dfs1(i);
  for (int i = order.size() - 1; i >= 0; i--) {
    if (!ssc[order[i]]) {
      dfs2(order[i], ++cssc);
    }
  }
  bool ok = true;
  for (int i = 1; i <= m; i++) {
    if (ssc[i] == ssc[Neg(i)]) {
      ok = false;
      break;
    }
  }
  if (ok) {
    for (int i = 1; i <= m; i++) {
      if (ssc[i] < ssc[Neg(i)])
        printf("o");
      else
        printf("i");
    }
    puts("");
  } else
    printf("Impossible\n");
  return 0;
}
