#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e4;
const long long int p = 31;
const long long int mod = 1e9 + 7;
std::vector<long long int> g[N], gt[N];
bool used[N];
vector<long long int> order;
long long int comp[N];
long long int n, m;
vector<bool> assignment;
void dfs1(long long int v) {
  used[v] = true;
  for (auto u : g[v]) {
    if (!used[u]) dfs1(u);
  }
  order.push_back(v);
}
void dfs2(long long int v, long long int cl) {
  comp[v] = cl;
  for (auto u : gt[v]) {
    if (comp[u] == -1) dfs2(u, cl);
  }
}
bool solve_2SAT() {
  m = m * 2;
  fill(used, used + m + 2, 0);
  for (int i = 0; i < m; ++i) {
    if (!used[i]) dfs1(i);
  }
  fill(comp, comp + m + 9, -1);
  for (int i = 0, j = 0; i < m; ++i) {
    int v = order[m - i - 1];
    if (comp[v] == -1) dfs2(v, j++);
  }
  assignment.assign(m / 2, false);
  for (int i = 0; i < m; i += 2) {
    if (comp[i] == comp[i + 1]) return false;
    assignment[i / 2] = comp[i] > comp[i + 1];
  }
  return true;
}
bool intersect(pair<long long int, long long int> a,
               pair<long long int, long long int> b) {
  return (a.first > b.first && a.second > b.second && a.first < b.second);
}
void solve() {
  cin >> n >> m;
  pair<long long int, long long int> ex[m];
  for (int i = 0; i < m; i++) {
    cin >> ex[i].first >> ex[i].second;
    if (ex[i].first > ex[i].second) {
      swap(ex[i].first, ex[i].second);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      if (intersect(ex[i], ex[j]) && i != j) {
        g[2 * i].push_back(2 * j + 1);
        g[2 * j].push_back(2 * i + 1);
        g[2 * i + 1].push_back(2 * j);
        g[2 * j + 1].push_back(2 * i);
        gt[2 * i].push_back(2 * j + 1);
        gt[2 * j].push_back(2 * i + 1);
        gt[2 * j + 1].push_back(2 * i);
        gt[2 * i + 1].push_back(2 * j);
      }
    }
  }
  if (solve_2SAT()) {
    for (auto i : assignment) {
      if (i) {
        cout << "i";
      } else {
        cout << "o";
      }
    }
  } else {
    cout << "Impossible";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
}
