#include <bits/stdc++.h>
using namespace std;
const int max_N = 200 + 10;
bool mark[max_N], flag[max_N];
int c, a[max_N], b[max_N], id[max_N], p[max_N];
vector<int> adj[5][max_N], vc;
void DFS(int v) {
  mark[v] = true;
  for (int i = 0; i < (int)adj[0][v].size(); i++) {
    int u = adj[0][v][i];
    if (id[u] != id[v]) adj[2][id[v]].push_back(id[u]);
    if (!mark[u]) DFS(u);
  }
}
void dfs(int v, int o) {
  mark[v] = flag[v] = true;
  int t = o;
  for (int i = 0; i < (int)adj[o][v].size(); i++) {
    int u = adj[o][v][i];
    if (!mark[u]) dfs(u, o);
  }
  if (!o || o == 2)
    vc.push_back(v);
  else if (o == 1)
    id[v] = c;
}
void find_comp(int n, int o) {
  fill(mark, mark + n, false);
  for (int i = 0; i < n; i++)
    if (!mark[i]) dfs(i, o);
  fill(mark, mark + n, false);
  while (!vc.empty()) {
    int t = vc.back();
    vc.pop_back();
    if (!mark[t]) {
      if (!o) {
        dfs(t, 1);
        c++;
      } else {
        flag[t] = true, flag[p[t]] = false;
        mark[t] = mark[p[t]] = true;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    if (a[i] > b[i]) swap(a[i], b[i]);
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i] < a[j] && a[j] < b[i] && b[i] < b[j]) {
        adj[0][i].push_back(m + j), adj[1][m + j].push_back(i);
        adj[0][j].push_back(m + i), adj[1][m + i].push_back(j);
        adj[0][m + i].push_back(j), adj[1][j].push_back(m + i);
        adj[0][m + j].push_back(i), adj[1][i].push_back(m + j);
      }
    }
  }
  int T = 2 * m;
  find_comp(T, 0);
  for (int i = 0; i < m; i++) {
    if (id[i] == id[m + i]) {
      cout << "Impossible\n";
      return 0;
    }
    p[id[i]] = id[m + i];
    p[id[m + i]] = id[i];
  }
  fill(mark, mark + T, false);
  for (int i = 0; i < T; i++)
    if (!mark[i]) DFS(i);
  find_comp(c, 2);
  for (int i = 0; i < m; i++) {
    if (flag[id[i]])
      cout << 'i';
    else
      cout << 'o';
  }
  return 0;
}
