#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e9;
const long long INFL = (long long)9e18;
const int MAXINT = ((~0) ^ (1 << 31));
const long long MAXLL = ((~0) ^ ((long long)1 << 63));
template <class T>
inline T pow2(T a) {
  return a * a;
}
template <class T>
inline bool mineq(T& a, T b) {
  return (a > b) ? (a = b, true) : false;
}
template <class T>
inline bool maxeq(T& a, T b) {
  return (a < b) ? (a = b, true) : false;
}
const int maxn = (int)1111;
;
vector<int> adj[maxn];
int n, m, visited[maxn];
pair<int, int> ed[maxn];
void Done() {
  cout << "Impossible";
  exit(0);
}
void dfs(int v, int id = 1) {
  visited[v] = id;
  for (auto u : adj[v]) {
    if (visited[u]) {
      if (visited[v] == visited[u]) Done();
    } else
      dfs(u, 3 - id);
  }
}
bool intersect(pair<int, int> a, pair<int, int> b) {
  if (a.first > a.second) swap(a.first, a.second);
  if (b.first > b.second) swap(b.first, b.second);
  if (a.first < b.first && b.first < a.second && a.second < b.second)
    return true;
  if (b.first < a.first && a.first < b.second && b.second < a.second)
    return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < (int)(m); i++) {
    cin >> ed[i].first >> ed[i].second;
    for (int j = 0; j < (int)(i); j++) {
      if (intersect(ed[i], ed[j])) {
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < (int)(m); i++)
    if (!visited[i]) dfs(i);
  for (int i = 0; i < (int)(m); i++) {
    cout << (visited[i] == 1 ? 'o' : 'i');
  }
}
