#include <bits/stdc++.h>
using namespace std;
const long long INF = INT_MAX;
const long long INFll = LLONG_MAX;
const long long mod = 998244353;
const double EPS = 1e-17;
void solveA();
void solveB();
void solveC();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  solveA();
  return 0;
}
vector<int> mark;
vector<vector<int>> adList;
vector<pair<int, int>> w;
bool dfs(int v) {
  for (int to : adList[v]) {
    if (!mark[to]) {
      mark[to] = -mark[v];
      if (!dfs(to)) return false;
    } else if (mark[to] == mark[v]) {
      return false;
    }
  }
  return true;
}
bool check(int a, int b) {
  return (w[a].first < w[b].first && w[a].second > w[b].first &&
          w[a].second < w[b].second);
}
void solveA() {
  int n, m;
  cin >> n >> m;
  mark.resize((unsigned)m);
  adList.resize((unsigned)m);
  w.resize((unsigned)m);
  for (int i = 0; i < m; i++) {
    cin >> w[i].first >> w[i].second;
    if (w[i].first > w[i].second) swap(w[i].first, w[i].second);
    for (int j = 0; j < i; j++) {
      if (check(i, j) || check(j, i)) {
        adList[i].push_back(j);
        adList[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    if (!mark[i]) {
      mark[i] = 1;
      if (!dfs(i)) {
        cout << "Impossible";
        return;
      }
    }
  }
  for (int i = 0; i < m; i++) cout << ((mark[i] == -1) ? "i" : "o");
}
