#include <bits/stdc++.h>
using namespace std;
const int s = 109;
char chi[s];
vector<pair<int, int> > yal;
char ch(char d) {
  if (d == 'i') {
    return 'o';
  }
  return 'i';
}
bool beyn(int a, int b) {
  if (yal[a].first < yal[b].first && yal[b].first < yal[a].second &&
      yal[b].second > yal[a].second) {
    return 1;
  }
  swap(a, b);
  if (yal[a].first < yal[b].first && yal[b].first < yal[a].second &&
      yal[b].second > yal[a].second) {
    return 1;
  }
  return 0;
}
int main() {
  int n, m, v, vv;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> v >> vv;
    yal.push_back(make_pair(min(v, vv), max(v, vv)));
  }
  stack<int> maj;
  stack<int> mu;
  int h;
  char d;
  for (int i = 0; i < m; i++) {
    if (chi[i] == 0) {
      maj.push(i);
      chi[i] = 'i';
      while (!maj.empty()) {
        h = maj.top();
        d = ch(chi[h]);
        for (int i = 0; i < m; i++) {
          if (beyn(i, h)) {
            if (chi[i] == chi[h]) {
              cout << "Impossible";
              return 0;
            } else {
              if (chi[i] == 0) {
                mu.push(i);
                chi[i] = d;
              }
            }
          }
        }
        maj.pop();
        while (!mu.empty()) {
          maj.push(mu.top());
          mu.pop();
        }
      }
    }
  }
  for (int i = 0; i < m; i++) {
    cout << chi[i];
  }
}
