#include <bits/stdc++.h>
using namespace std;
bool assign[102];
vector<int> G[300], RG[302], order;
int v[302], ans[302], id;
void dfs1(int x) {
  if (v[x]) return;
  v[x] = 1;
  int i;
  for (i = 0; i < G[x].size(); i++) dfs1(G[x][i]);
  order.push_back(x);
}
void dfs2(int x) {
  if (v[x] == 2) return;
  v[x] = 2;
  int i;
  for (i = 0; i < RG[x].size(); i++) dfs2(RG[x][i]);
  ans[x] = id;
}
void scc(int n) {
  int i, j;
  for (i = 0; i < n; i++) dfs1(i);
  for (i = n - 1; i >= 0; i--) {
    if (v[order[i]] != 2) {
      dfs2(order[i]);
      id++;
    }
  }
}
bool check(pair<int, int> x, pair<int, int> y) {
  if (x.first > y.first && x.first < y.second && x.second > y.second)
    return true;
  if (y.first > x.first && y.first < x.second && y.second > x.second)
    return true;
  return false;
}
int main() {
  int i, n, j, m;
  scanf("%d%d", &n, &m);
  ;
  vector<pair<int, int> > ed;
  for (i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    ;
    if (x > y) swap(x, y);
    ed.push_back(make_pair(x, y));
  }
  for (i = 0; i < m; i++)
    for (j = i + 1; j < m; j++) {
      pair<int, int> x = ed[i], y = ed[j];
      if (check(x, y)) {
        G[i].push_back(j + m);
        G[j].push_back(m + i);
        G[j + m].push_back(i);
        G[m + i].push_back(j);
        RG[m + j].push_back(i);
        RG[m + i].push_back(j);
        RG[i].push_back(j + m);
        RG[j].push_back(m + i);
      }
    }
  scc(2 * m);
  for (i = 0; i < m; i++)
    if (ans[i] == ans[i + m]) {
      cout << "Impossible" << endl;
      return 0;
    }
  for (i = 0; i < m; i++) {
    if (ans[i] < ans[i + m])
      cout << "i";
    else
      cout << "o";
  }
  cout << endl;
  return 0;
}
