#include <bits/stdc++.h>
using namespace std;
const int N = 300;
int n, m, c[N], a[N], b[N];
bool vis[N];
vector<int> adj[N], jda[N];
void add_edge(int v, int u) { adj[v].push_back(u), jda[u].push_back(v); }
void add_clause(int v, int u, int x, int y) {
  add_edge(v << 1 | !x, u << 1 | y);
  add_edge(u << 1 | !y, v << 1 | x);
}
void dfs(int v, vector<int> *adj, vector<int> &vec) {
  vis[v] = true;
  for (auto u : adj[v])
    if (!vis[u]) dfs(u, adj, vec);
  vec.push_back(v);
}
bool check(int i, int j) {
  return ((a[j] > a[i] && b[i] > a[j] && b[j] > b[i]) ||
          (a[i] > a[j] && b[j] > a[i] && b[i] > b[j]));
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  swap(n, m);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    if (a[i] > b[i]) swap(a[i], b[i]);
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (check(i, j)) {
        add_clause(i, j, 0, 0);
        add_clause(i, j, 1, 1);
      }
  vector<int> L;
  for (int i = 0; i < n << 1; i++)
    if (!vis[i]) dfs(i, adj, L);
  reverse(L.begin(), L.end());
  fill(vis, vis + (n << 1), false);
  int cnt = 0;
  for (auto v : L)
    if (!vis[v]) {
      vector<int> vec;
      dfs(v, jda, vec);
      for (auto v : vec) c[v] = cnt;
      cnt++;
    }
  for (int i = 0; i < n; i++)
    if (c[i << 1] == c[i << 1 | 1]) return cout << "Impossible\n", 0;
  for (int i = 0; i < n; i++) cout << (c[i << 1] < c[i << 1 | 1] ? 'o' : 'i');
  cout << '\n';
  return 0;
}
