#include <bits/stdc++.h>
using namespace std;
const int maxn = 210;
int n, m;
pair<int, int> edg[maxn];
vector<int> adj[maxn], radj[maxn];
bool mark[maxn];
int comp[maxn];
vector<int> srt;
void dfs(int v) {
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (!mark[u]) {
      mark[u] = true;
      dfs(u);
    }
  }
  srt.push_back(v);
}
void sfd(int v, int cnt) {
  comp[v] = cnt;
  for (int i = 0; i < radj[v].size(); i++) {
    int u = adj[v][i];
    if (comp[u] == 0) {
      sfd(u, cnt);
    }
  }
}
bool twosat() {
  for (int i = 1; i <= 2 * m; i++) {
    if (!mark[i]) {
      mark[i] = true;
      dfs(i);
    }
  }
  int cnt = 1;
  while (srt.size()) {
    int top = srt[srt.size() - 1];
    srt.pop_back();
    if (comp[top] == 0) {
      comp[top] = cnt;
      sfd(top, cnt);
      cnt++;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (comp[i] == comp[i + m]) {
      return false;
    }
  }
  return true;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    edg[i].first = a;
    edg[i].second = b;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      int sa = edg[i].first, fa = edg[i].second, sb = edg[j].first,
          fb = edg[j].second;
      if (sa > fa) {
        swap(sa, fa);
      }
      if (sb > fb) {
        swap(sb, fb);
      }
      if (((sa > sb) && (sa < fb) && (fa > fb)) ||
          ((sb > sa) && (sb < fa) && (fb > fa))) {
        adj[i + m].push_back(j);
        adj[j + m].push_back(i);
        adj[i].push_back(j + m);
        adj[j].push_back(i + m);
        radj[j].push_back(i + m);
        radj[i].push_back(j + m);
        radj[j + m].push_back(i);
        radj[i + m].push_back(j);
      }
    }
  }
  if (!twosat()) {
    cout << "Impossible";
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    if (comp[i + m] < comp[i]) {
      cout << "i";
    } else {
      cout << "o";
    }
  }
}
