#include <bits/stdc++.h>
using namespace std;
const int N = 2e2 + 5;
int a[N], b[N];
vector<int> v[N];
int c[N];
bool check(int i, int j) {
  int x = a[i], y = b[i];
  int xx = a[j], yy = b[j];
  if (xx <= x && y <= yy) return 0;
  if (x <= xx && yy <= y) return 0;
  if (yy <= x || y <= xx) return 0;
  return 1;
}
void dfs(int s, int f) {
  c[s] = f;
  for (auto i : v[s]) {
    if (c[i] == -1)
      dfs(i, f ^ 1);
    else if (c[i] == f) {
      cout << "Impossible";
      exit(0);
    }
  }
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a[i] >> b[i];
    if (a[i] > b[i]) swap(a[i], b[i]);
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      if (check(i, j)) v[i].push_back(j), v[j].push_back(i);
    }
  }
  memset(c, -1, sizeof(c));
  for (int i = 1; i <= n; i++) {
    if (c[i] == -1) {
      dfs(i, 0);
    }
  }
  for (int i = 1; i <= m; i++) cout << (c[i] ? 'o' : 'i');
  return 0;
}
