#include <bits/stdc++.h>
using namespace std;
const int N = 207;
int n, m, be[N], en[N], col[N];
vector<int> G[N];
bool f, used[N];
void dfs(int u, int t = 0) {
  used[u] = true;
  col[u] = t;
  for (int i = 0; i < (int)(G[u]).size(); ++i) {
    int to = G[u][i];
    if (used[to] && col[to] == t) f = true;
    if (!used[to]) dfs(to, 1 - t);
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> be[i] >> en[i];
    if (be[i] > en[i]) swap(be[i], en[i]);
  }
  for (int i = 0; i < m; ++i) {
    for (int j = i + 1; j < m; ++j) {
      if ((be[i] < be[j] && be[j] < en[i] && en[j] != en[i] && en[j] != be[i] &&
           !(be[i] < en[j] && en[j] < en[i])) ||
          (be[i] < en[j] && en[j] < en[i] && be[j] != en[i] && be[j] != be[i] &&
           !(be[i] < be[j] && be[j] < en[i]))) {
        cerr << i + 1 << " " << j + 1 << endl;
        G[i].push_back(j);
        G[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; ++i)
    if (!used[i]) dfs(i);
  if (f)
    puts("Impossible");
  else
    for (int i = 0; i < m; ++i) putchar(col[i] ? 'i' : 'o');
  return 0;
}
