#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 10;
bool possible, mark[2 * N];
int n, m, c, a[N], b[N], com[2 * N];
vector<int> topol, from[2 * N], to[2 * N];
void dfs_scc(int u, int c) {
  com[u] = c;
  mark[u] = true;
  for (auto v : to[u])
    if (!mark[v]) dfs_scc(v, c);
}
void strongly_connected_components() {
  memset(mark, false, sizeof mark);
  for (int i = 0; i < 2 * m; i++)
    if (!mark[i]) dfs_scc(i, c++);
}
void dfs_topolo(int u) {
  mark[u] = true;
  for (auto v : from[u])
    if (!mark[v]) dfs_topolo(v);
  topol.push_back(u);
}
void topological_sort() {
  for (int i = 0; i < 2 * m; i++)
    if (!mark[i]) dfs_topolo(i);
  reverse(topol.begin(), topol.end());
}
bool check(int u, int v) {
  int a1 = a[u], b1 = b[u];
  int a2 = a[v], b2 = b[v];
  if (b1 < a1) swap(b1, a1);
  if (b2 < a2) swap(a2, b2);
  if (a2 < a1) swap(a1, a2), swap(b1, b2);
  if (b2 <= b1) return false;
  if (a2 >= b1) return false;
  if (a1 == a2 || b1 == b2) return false;
  return true;
}
void add_edge(int u, int v) {
  from[u].push_back(v);
  from[v].push_back(u);
  to[v].push_back(u);
  to[u].push_back(v);
}
void add_clause(int u, int v) {
  add_edge(u ^ 1, v);
  add_edge(u, v ^ 1);
}
void get_clauses() {
  for (int i = 0; i < m - 1; i++)
    for (int j = i + 1; j < m; j++)
      if (check(i, j)) add_clause(i << 1, j << 1);
}
void input() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) cin >> a[i] >> b[i];
}
void solve() {
  get_clauses();
  topological_sort();
  strongly_connected_components();
  for (int i = 0; i < m; i++)
    if (com[i << 1] == com[i << 1 ^ 1]) {
      possible = true;
      return;
    }
}
void output() {
  if (possible) {
    cout << "Impossible";
    return;
  }
  for (int i = 0; i < m; i++)
    cout << (com[i << 1] > com[i << 1 ^ 1] ? "i" : "o");
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  input(), solve(), output();
  return 0;
}
