#include <bits/stdc++.h>
using namespace std;
const int tam = 100010;
const int MOD = 1000000007;
const int MOD1 = 998244353;
const double EPS = 1e-9;
const double PI = acos(-1);
vector<int> g[200];
int cols[200];
bool chech(int n, int col) {
  bool res = true;
  cols[n] = abs(col - 1);
  for (int i = 0; i < g[n].size(); i++) {
    if (cols[g[n][i]] == -1)
      res &= chech(g[n][i], cols[n]);
    else if (cols[g[n][i]] != col)
      return false;
  }
  return res;
}
pair<int, int> cra[200];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  pair<bool, bool> x, y;
  int a, b;
  for (long long i = 0; i < m; i++) {
    cin >> a >> b;
    a--;
    b--;
    if (a > b) swap(a, b);
    for (long long j = 0; j < i; j++) {
      if (a < cra[j].first) {
        if (cra[j].first < b && cra[j].first > a && cra[j].second > b) {
          g[i].push_back(j);
          g[j].push_back(i);
        }
      } else {
        if (cra[j].second > a && cra[j].first < a && cra[j].second < b) {
          g[i].push_back(j);
          g[j].push_back(i);
        }
      }
    }
    cra[i] = make_pair(a, b);
  }
  memset(cols, (-1), sizeof(cols));
  bool res = true;
  for (long long i = 0; i < m; i++) {
    if (cols[i] == -1) res &= chech(i, 0);
  }
  if (res) {
    for (long long i = 0; i < m; i++) cout << (cols[i] ? 'i' : 'o');
    cout << '\n';
  } else
    cout << "Impossible\n";
  return 0;
}
