#include <bits/stdc++.h>
using namespace std;
int main(int argv, char** argc) {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<pair<int, int> > v(m);
  for (int i = 0; i < (m); ++i) scanf("%d %d", &v[i].first, &v[i].second);
  vector<vector<bool> > g(2 * m, vector<bool>(2 * m));
  for (int i = 0; i < (2 * m); ++i) g[i][i] = 1;
  for (int i = 0; i < (m); ++i)
    for (int j = 0; j < (m); ++j)
      if (i != j) {
        vector<pair<int, int> > tmp;
        tmp.push_back(make_pair(v[i].first, 0));
        tmp.push_back(make_pair(v[i].second, 0));
        tmp.push_back(make_pair(v[j].first, 1));
        tmp.push_back(make_pair(v[j].second, 1));
        sort(tmp.begin(), tmp.end());
        bool com = 0;
        for (int k = 0; k < (3); ++k)
          if (tmp[k].first == tmp[k + 1].first) com = 1;
        if (com) continue;
        if (tmp[0].second == tmp[2].second) {
          g[2 * i][2 * j + 1] = 1;
          g[2 * i + 1][2 * j] = 1;
          g[2 * j][2 * i + 1] = 1;
          g[2 * j + 1][2 * i] = 1;
        }
      }
  for (int k = 0; k < (2 * m); ++k)
    for (int i = 0; i < (2 * m); ++i)
      for (int j = 0; j < (2 * m); ++j)
        if (g[i][k] && g[k][j]) g[i][j] = 1;
  for (int i = 0; i < (2 * m); ++i)
    if (g[i][i ^ 1] && g[i ^ 1][i]) {
      printf("Impossible\n");
      return 0;
    }
  vector<int> comp(2 * m, -1);
  int actcomp = 0;
  for (int i = 0; i < (2 * m); ++i)
    if (comp[i] == -1) {
      comp[i] = actcomp;
      for (int j = 0; j < (2 * m); ++j)
        if (g[i][j] && g[j][i] && comp[j] == -1) {
          comp[j] = actcomp;
        }
      ++actcomp;
    }
  vector<vector<bool> > gm(actcomp, vector<bool>(actcomp));
  vector<int> indeg(actcomp);
  vector<int> val(2 * m, -1);
  for (int i = 0; i < (2 * m); ++i)
    for (int j = 0; j < (2 * m); ++j)
      if (comp[i] != comp[j] && g[i][j]) {
        gm[comp[i]][comp[j]] = 1, indeg[comp[j]]++;
      }
  for (int cc = 0; cc < (actcomp); ++cc)
    for (int t = 0; t < (actcomp); ++t)
      if (indeg[t] == 0) {
        indeg[t] = -1;
        int aval = -1;
        for (int i = 0; i < (2 * m); ++i)
          if (comp[i] == t) {
            int other = i ^ 1;
            int bval = val[other];
            if (bval != -1) {
              aval = bval ^ 1;
              break;
            }
          }
        if (aval == -1) aval = 0;
        for (int i = 0; i < (2 * m); ++i)
          if (comp[i] == t) {
            assert(val[i] == -1);
            val[i] = aval;
          }
        for (int i = 0; i < (actcomp); ++i)
          if (gm[t][i]) indeg[i]--;
        break;
      }
  for (int i = 0; i < (m); ++i)
    if (val[2 * i])
      printf("i");
    else
      printf("o");
  printf("\n");
  return 0;
}
