#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int n, m;
int l[101], r[101];
bool vis[101];
int par[101];
void dfs(int node, int color) {
  vis[node] = true;
  par[node] = color;
  for (int i = 0; i < m; ++i) {
    if (i == node) continue;
    int a, b, c, d;
    a = l[node];
    b = r[node];
    c = l[i];
    d = r[i];
    if ((r[i] > r[node] && l[i] < r[node] && l[i] > l[node]) ||
        (l[i] < l[node] && r[i] < r[node] && r[i] > l[node])) {
      if (vis[i] == false) {
        dfs(i, 1 - color);
      } else if (par[i] == color) {
        cout << "Impossible\n";
        exit(0);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> l[i] >> r[i];
    if (l[i] > r[i]) swap(l[i], r[i]);
  }
  memset(vis, false, sizeof(vis));
  for (int i = 0; i < m; ++i) {
    if (vis[i] == false) dfs(i, 0);
  }
  for (int i = 0; i < m; i++)
    if (par[i] != 0)
      cout << 'i';
    else
      cout << 'o';
  cout << '\n';
  return 0;
}
