#include <bits/stdc++.h>
using namespace std;
const int mm = 1e2 + 50;
long long n, m;
int color[mm];
vector<int> g[mm];
vector<pair<pair<int, int>, int>> yal;
void input() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    yal.push_back(make_pair(make_pair(u, v), i));
  }
}
bool tadakhol(int u1, int u2, int v1, int v2) {
  if (u1 < v1 && v1 < u2 && u2 < v2) return 1;
  if (v1 < u1 && u1 < v2 && v2 < u2) return 1;
  return 0;
}
void make_g() {
  for (auto v : yal) {
    for (auto u : yal) {
      if (tadakhol(min(v.first.first, v.first.second),
                   max(v.first.first, v.first.second),
                   min(u.first.first, u.first.second),
                   max(u.first.first, u.first.second))) {
        g[u.second].push_back(v.second);
      }
    }
  }
}
bool dfs(int u, bool y) {
  color[u] = y + 1;
  bool y2 = 1;
  for (auto v : g[u]) {
    if (color[v] != 0) {
      if (color[v] == color[u]) return 0;
    } else {
      y2 = y2 & dfs(v, !y);
    }
  }
  return y2;
}
bool dfs_r() {
  for (int i = 0; i < m; i++)
    if (!color[i]) {
      if (!dfs(i, 1)) {
        return 0;
      }
    }
  return 1;
}
int main() {
  input();
  make_g();
  if (!dfs_r()) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    if (color[i] == 1)
      cout << 'i';
    else
      cout << 'o';
  }
}
