#include <bits/stdc++.h>
using namespace std;
int inf_int = 2e9;
long long inf_ll = 2e18;
const double pi = 3.1415926535898;
template <typename T, typename T1>
void prin(vector<pair<T, T1> >& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i].first << " " << a[i].second << "\n";
  }
}
template <typename T, typename T1>
void prin(set<pair<T, T1> >& a) {
  for (auto it = a.begin(); it != a.end(); it++) {
    cout << it->first << " " << it->second << "\n";
  }
}
template <typename T>
void prin(vector<T>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i];
    if (i < a.size() - 1)
      cout << " ";
    else
      cout << "\n";
  }
}
template <typename T>
void prin(set<T>& a) {
  for (auto it = a.begin(); it != a.end(); it++) {
    cout << *it << " ";
  }
}
template <typename T>
void prin_new_line(vector<T>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << "\n";
  }
}
template <typename T, typename T1>
void prin_new_line(vector<pair<T, T1> >& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i].first << " " << a[i].second << "\n";
  }
}
bool debug = 0;
const int maxn = 1e5 + 200;
int mod = 1e9 + 7;
vector<int> g[maxn];
int a[maxn], b[maxn];
bool intersect(int l1, int r1, int l2, int r2) {
  if (l1 <= l2 && r1 >= r2) return false;
  if (l2 <= l1 && r2 >= r1) return false;
  if (l2 < l1 && r2 > l1) return true;
  if (l2 < r1 && r2 > r1) return true;
  return false;
}
char used[maxn];
vector<int> ord;
int comp[maxn];
void dfs(int v) {
  used[v] = true;
  for (int to : g[v]) {
    if (!used[to]) {
      dfs(to);
    }
  }
  ord.push_back(v);
}
void dfs(int v, int cl) {
  comp[v] = cl;
  for (int to : g[v]) {
    if (comp[to] == 0) {
      dfs(to, cl);
    }
  }
}
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    if (a[i] > b[i]) swap(a[i], b[i]);
  }
  for (int i = 0; i < m; i++) {
    for (int e = i + 1; e < m; e++) {
      if (intersect(a[i], b[i], a[e], b[e])) {
        int x = 2 * i;
        int y = 2 * e;
        g[x].push_back(y ^ 1);
        g[y].push_back(x ^ 1);
        g[y ^ 1].push_back(x);
        g[x ^ 1].push_back(y);
      }
    }
  }
  for (int i = 0; i < 2 * m; i++) {
    if (!used[i]) dfs(i);
  }
  reverse(ord.begin(), ord.end());
  int z = 1;
  for (int v : ord) {
    if (comp[v] == 0) dfs(v, z++);
  }
  for (int i = 0; i < 2 * m; i = i + 2) {
    if (comp[i] == comp[i + 1]) {
      cout << "Impossible";
      return;
    }
  }
  for (int i = 0; i < 2 * m; i = i + 2) {
    if (comp[i] > comp[i + 1])
      cout << "o";
    else
      cout << "i";
  }
}
int main() {
  if (!debug) {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  }
  int t = 1;
  while (t--) solve();
  return 0;
}
