#include <bits/stdc++.h>
using namespace std;
const int ma = 1e5 + 5;
bool vis[105];
int dir[105], x[105], y[105];
vector<int> v[105];
bool f = false;
void dfs(int r, int val) {
  vis[r] = true;
  dir[r] = val;
  for (int i = 0; i < v[r].size(); i++) {
    if (!vis[v[r][i]]) {
      dfs(v[r][i], 1 - dir[r]);
    } else {
      if (dir[v[r][i]] == dir[r]) {
        f = true;
        return;
      }
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  memset(vis, false, sizeof(vis));
  memset(dir, -1, sizeof(dir));
  for (int i = 1; i <= m; i++) {
    cin >> x[i] >> y[i];
  }
  long long matp1, matp2, mitp1, mitp2;
  for (int i = 1; i <= m; i++) {
    matp1 = max(x[i], y[i]);
    mitp1 = min(x[i], y[i]);
    for (int j = i + 1; j <= m; j++) {
      matp2 = max(x[j], y[j]);
      mitp2 = min(x[j], y[j]);
      if (((mitp2 > mitp1 and mitp2 < matp1) and matp2 > matp1) or
          ((matp2 > mitp1 and matp2 < matp1) and mitp2 < mitp1)) {
        v[i].push_back(j);
        v[j].push_back(i);
      }
    }
  }
  for (int i = 1; i <= m; i++)
    if (!vis[i]) dfs(i, 0);
  if (!f) {
    for (int i = 1; i <= m; i++) {
      if (dir[i] == 0)
        cout << 'o';
      else
        cout << 'i';
    }
    cout << endl;
  } else {
    cout << "Impossible" << endl;
  }
  return 0;
}
