#include <bits/stdc++.h>
using namespace std;
const long double epsilon = 1e-9;
vector<pair<int, int> > roads;
bool intersectMine(int x1, int y1, int x2, int y2);
bool intersect(int i, int j) {
  return intersectMine(roads[i].first, roads[i].second, roads[j].first,
                       roads[j].second);
}
bool intersectMine(int x1, int y1, int x2, int y2) {
  int a = (x1 - x2) * (y1 - x2);
  int b = (x1 - y2) * (y1 - y2);
  int c = (x2 - x1) * (y2 - x1);
  int d = (x2 - y1) * (y2 - y1);
  if (a == 0 || b == 0 || c == 0 || d == 0) return false;
  if ((a < 0) ^ (b < 0)) return true;
  if ((c < 0) ^ (d < 0)) return true;
  return false;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> vis(m, -1);
  roads.resize(m);
  for (int i = 0; i < m; i++) cin >> roads[i].first >> roads[i].second;
  queue<int> toProcess;
  int cur;
  for (int i = 0; i < m; i++) {
    if (vis[i] == -1) {
      toProcess.push(i);
      vis[i] = 0;
      while (!toProcess.empty()) {
        cur = toProcess.front();
        toProcess.pop();
        for (int j = 0; j < m; j++) {
          if (j == cur) continue;
          if (intersect(cur, j)) {
            if (vis[j] != -1) {
              if (vis[j] == vis[cur]) {
                cout << "Impossible" << endl;
                return 0;
              }
            } else {
              vis[j] = !vis[cur];
              toProcess.push(j);
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < m; i++)
    if (vis[i] == 0)
      cout << "i";
    else
      cout << "o";
  cout << endl;
  return 0;
}
