#include <bits/stdc++.h>
using namespace std;
const int maxN = 100 + 10;
int n, m, mark[maxN * 2], comp[maxN * 2];
vector<pair<int, int> > edge;
vector<int> adj[maxN * 2];
void dfs(int v, int cnt) {
  comp[v] = cnt;
  mark[v] = 1;
  for (int i = 0; i < adj[v].size(); i++) {
    int x = adj[v][i];
    if (!mark[x]) dfs(x, cnt);
  }
}
bool ok(int x, int y, int u, int v) {
  if (x < y) swap(x, y);
  if (u < v) swap(u, v);
  if ((u > x && x > v && v > y) || (x > u && u > y && y > v)) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    edge.push_back(make_pair(x, y));
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < i; j++) {
      int x = edge[i].first, y = edge[i].second, u = edge[j].first,
          v = edge[j].second;
      if (ok(x, y, u, v)) {
        int a = i * 2;
        int b = j * 2;
        adj[a].push_back(b + 1);
        adj[b].push_back(a + 1);
        adj[a + 1].push_back(b);
        adj[b + 1].push_back(a);
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i < 2 * m; i++) {
    if (!mark[i]) {
      dfs(i, cnt);
      cnt++;
    }
  }
  for (int i = 0; i < m; i++)
    if (comp[i * 2] == comp[i * 2 + 1]) return cout << "Impossible", 0;
  for (int i = 0; i < m; i++)
    if (comp[i * 2] < comp[i * 2 + 1])
      cout << "i";
    else
      cout << "o";
  return 0;
}
