#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b,
                 long long mod = (long long)(1e9 + 7)) {
  if (!b) return 1;
  a %= mod;
  return modpow(a * a % mod, b / 2, mod) * (b & 1 ? a : 1, mod) % mod;
}
vector<int> adj[1000];
int color[1000];
void dfs(int i, bool vis[], int c) {
  vis[i] = true;
  color[i] = c;
  for (int w : adj[i]) {
    if (!vis[w])
      dfs(w, vis, c ^ 1);
    else if (color[w] == color[i]) {
      cout << "Impossible" << endl;
      exit(0);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  pair<int, int> r[m];
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    if (x < y)
      r[i] = pair<int, int>(x, y);
    else
      r[i] = pair<int, int>(y, x);
    for (int j = 0; j < i; j++) {
      if ((r[j].first < x && x < r[j].second) &&
          (y < r[j].first || y > r[j].second))
        adj[i].push_back(j), adj[j].push_back(i);
      swap(x, y);
      if ((r[j].first < x && x < r[j].second) &&
          (y < r[j].first || y > r[j].second))
        adj[i].push_back(j), adj[j].push_back(i);
    }
  }
  bool vis[m];
  memset(vis, false, sizeof(vis));
  for (int i = 0; i < m; i++)
    if (!vis[i]) dfs(i, vis, 0);
  for (int i = 0; i < m; i++)
    if (color[i] == 0)
      cout << 'i';
    else
      cout << 'o';
  cout << endl;
  return 0;
}
