#include <bits/stdc++.h>
using namespace std;
struct dsu {
  vector<int> P, rank;
  dsu(int n) : P(n), rank(n) {
    for (int i = 0; i < n; i++) {
      P[i] = i;
      rank[i] = 0;
    }
  }
  int fnd(int i) {
    if (i != P[i]) P[i] = fnd(P[i]);
    return P[i];
  }
  void join(int x, int y) {
    int PX = fnd(x);
    int PY = fnd(y);
    if (rank[PX] > rank[PY])
      P[PY] = PX;
    else
      P[PX] = PY;
    if (rank[PX] == rank[PY]) rank[PY] = rank[PX] + 1;
  }
};
vector<pair<int, int> > vct;
vector<pair<int, int> > ctf;
vector<int> adj[110];
int vis[110], col[110];
void dfs(int i, int par, int clr) {
  vis[i] = 1;
  col[i] = clr;
  for (auto j : adj[i]) {
    if (j == par) continue;
    dfs(j, i, clr ^ 1);
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int x, y, i = 0; i < m; ++i) {
    cin >> x >> y;
    if (x > y) swap(x, y);
    vct.push_back({x, y});
  }
  for (int i = 0; i < m; ++i) {
    for (int j = i + 1; j < m; ++j) {
      auto t1 = vct[i];
      auto t2 = vct[j];
      if ((t2.first < t1.second and t2.second > t1.second and
           t2.first > t1.first) or
          (t1.first < t2.second and t1.second > t2.second and
           t1.first > t2.first)) {
        ctf.push_back({i, j});
      }
    }
  }
  dsu d(m + 2);
  for (auto i : ctf) {
    if (d.fnd(i.first) == d.fnd(i.second)) continue;
    d.join(i.first, i.second);
    adj[i.first].push_back(i.second);
    adj[i.second].push_back(i.first);
  }
  for (int i = 0; i < m; ++i) {
    if (!vis[i]) dfs(i, -1, 0);
  }
  for (auto i : ctf) {
    if (col[i.first] == col[i.second]) {
      return puts("Impossible"), 0;
    }
  }
  for (int i = 0; i < m; ++i) {
    if (col[i])
      cout << 'i';
    else
      cout << 'o';
  }
  cout << endl;
}
