#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
struct plll {
  long long int first, second, third;
};
const long long int MAXN = 2e2 + 20, md = 1e9 + 7, inf = 5e18;
vector<long long int> adj[MAXN];
long long int c[MAXN], x = 0;
string ans;
vector<pair<long long int, long long int> > q;
void DFS(long long int r) {
  c[r] = x;
  for (auto i : adj[r]) {
    if (~c[i]) continue;
    DFS(i);
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(c, -1, sizeof(c));
  long long int n, m;
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    long long int v, u;
    cin >> v >> u;
    v--;
    u--;
    if (v > u) swap(v, u);
    q.push_back({v, u});
  }
  for (long long int i = 0; i < m; i++) {
    for (long long int j = i + 1; j < m; j++) {
      if (q[j].second > q[i].first && q[j].second < q[i].second &&
          q[j].first < q[i].first) {
        adj[i].push_back(j + m);
        adj[j + m].push_back(i);
        adj[j].push_back(i + m);
        adj[i + m].push_back(j);
      }
      if (q[j].first > q[i].first && q[j].first < q[i].second &&
          q[j].second > q[i].second) {
        adj[i].push_back(j + m);
        adj[j + m].push_back(i);
        adj[j].push_back(i + m);
        adj[i + m].push_back(j);
      }
    }
  }
  for (long long int i = 0; i < 2 * m; i++) {
    if (~c[i]) continue;
    DFS(i);
    x++;
  }
  for (int i = 0; i < m; i++) {
    if (c[i] == c[i + m]) {
      cout << "Impossible\n";
      return 0;
    }
    if (c[i] < c[i + m]) {
      ans += 'i';
    } else {
      ans += 'o';
    }
  }
  cout << ans << '\n';
  return 0;
}
