#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
const int mod = 1e9 + 7;
const long long INF = 9223372036854775807;
const int inf = 2e9 + 7;
vector<int> v[maxn];
vector<int> in[maxn];
vector<int> out[maxn];
vector<int> tpl;
bool mark[maxn];
bool vis[maxn];
long long tmp = 1;
long long com[maxn];
long long n, m;
char ans[maxn];
pair<long long, long long> p[maxn];
void dfs_scc(int v) {
  com[v] = tmp;
  mark[v] = 1;
  for (auto e : in[v]) {
    if (!mark[e]) {
      dfs_scc(e);
    }
  }
}
void dfs(int v) {
  mark[v] = 1;
  for (auto e : out[v]) {
    if (!mark[e]) {
      dfs(e);
    }
  }
  tpl.push_back(v);
}
void scc() {
  for (int i = 1; i <= 2 * m; i++) {
    if (!mark[i]) {
      dfs(i);
    }
  }
  memset(mark, 0, sizeof mark);
  reverse(tpl.begin(), tpl.end());
  for (auto e : tpl) {
    int u = e;
    if (!mark[u]) {
      dfs_scc(u);
      tmp++;
    }
  }
}
bool check(int x, int y) {
  int a1 = p[x].first, a2 = p[x].second, b1 = p[y].first, b2 = p[y].second;
  if (a2 < a1) swap(a1, a2);
  if (b2 < b1) swap(b1, b2);
  if (a1 < b1 && b1 < a2 && a2 < b2) return 1;
  if (b1 < a1 && a1 < b2 && b2 < a2) return 1;
  return 0;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> p[i].first >> p[i].second;
  }
  for (int j = 1; j <= m; j++) {
    for (int i = 1; i <= m; i++) {
      if (check(j, i)) {
        in[j].push_back(i + m);
        out[i + m].push_back(j);
        in[i].push_back(j + m);
        out[j + m].push_back(i);
        in[j + m].push_back(i);
        out[i].push_back(j + m);
        in[i + m].push_back(j);
        out[j].push_back(i + m);
      }
    }
  }
  scc();
  bool curr = 1;
  for (int i = 1; i <= m; i++) {
    if (com[i] == com[i + m]) {
      curr = 0;
    }
  }
  if (!curr) {
    cout << "Impossible" << endl;
    return 0;
  }
  memset(mark, 0, sizeof mark);
  reverse(tpl.begin(), tpl.end());
  for (int i = 1; i <= m; i++) {
    if (com[i] > com[i + m]) {
      ans[i] = 'i';
    } else {
      ans[i] = 'o';
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i];
  }
  cout << endl;
}
