#include <bits/stdc++.h>
using namespace std;
map<long long, vector<long long>> mp;
bool ans[50000], vis[50000];
vector<pair<long long, long long>> v;
bool w = false;
bool check(long long i, long long j) {
  if (v[i].first < v[j].second && v[i].first > v[j].first &&
      v[i].second > v[j].second)
    return true;
  if (v[i].second < v[j].second && v[i].second > v[j].first &&
      v[i].first < v[j].first)
    return true;
  return false;
}
void dfs(long long i, long long t) {
  if (vis[i]) {
    if (ans[i] != t) w = true;
    return;
  }
  vis[i] = 1;
  ans[i] = t;
  for (auto it : mp[i]) dfs(it, t ^ 1);
}
int32_t main() {
  {
    long long n, m;
    cin >> n >> m;
    for (long long i = 0; i < m; i++) {
      long long x, y;
      cin >> x >> y;
      if (y < x) swap(x, y);
      v.push_back({x, y});
    }
    for (long long i = 0; i < m; i++) {
      for (long long j = i + 1; j < m; j++)
        if (check(i, j)) {
          mp[i].push_back(j);
          mp[j].push_back(i);
        }
    }
    for (long long i = 0; i < m; i++) {
      if (!vis[i]) dfs(i, 0);
    }
    if (w)
      cout << "Impossible\n";
    else {
      for (long long i = 0; i < m; i++) {
        if (ans[i])
          cout << "i";
        else
          cout << "o";
      }
    }
  }
}
