#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int powmod(long long a, int b) {
  long long res = 1;
  if (a >= mod) a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a;
    if (res >= mod) res %= mod;
    a = a * a;
    if (a >= mod) a %= mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
pair<int, int> in[105];
vector<int> g[105];
int v[105] = {0}, n, m;
int dfs(int x) {
  int i, c;
  if (v[x] == 1)
    c = 2;
  else
    c = 1;
  for (i = 0; i < g[x].size(); i++) {
    if (v[g[x][i]] == 0) {
      v[g[x][i]] = c;
      if (dfs(g[x][i]) == 0) return 0;
    } else if (v[g[x][i]] != c)
      return 0;
  }
  return 1;
}
int main() {
  int a, b, i, j;
  cin >> n;
  cin >> m;
  for (i = 1; i <= m; i++) {
    cin >> a >> b;
    in[i] = make_pair(min(a, b), max(a, b));
  }
  pair<int, int> p1, p2;
  int coun = 0;
  for (i = 1; i <= m; i++) {
    for (j = i + 1; j <= m; j++) {
      p1 = in[i];
      p2 = in[j];
      ;
      if (p1 > p2) swap(p1, p2);
      if (p1.first < p2.first && p2.first < p1.second &&
          p1.second < p2.second) {
        g[i].push_back(j);
        g[j].push_back(i);
      }
    }
  }
  for (i = 1; i <= m; i++) {
    if (v[i] == 0) {
      v[i] = 1;
      if (dfs(i) == 0) {
        cout << "Impossible\n";
        return 0;
      }
    }
  }
  for (i = 1; i <= m; i++)
    if (v[i] == 1)
      cout << "i";
    else
      cout << "o";
  cout << '\n';
  return 0;
}
