#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:20000000")
using namespace std;
const long long mod = 1000000007;
const double eps = 1e-7;
const long long INF = 1000000000000000000;
int kol[111];
int a[111], b[111];
vector<int> g[111];
void dfs(int v, int k) {
  kol[v] = k;
  for (int(i) = (0); (i) < (g[v].size()); ++(i))
    if (kol[g[v][i]] == -1) dfs(g[v][i], (k + 1) % 2);
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int(i) = (0); (i) < (m); ++(i)) {
    cin >> a[i] >> b[i];
    if (b[i] < a[i]) swap(a[i], b[i]);
  }
  n = m;
  for (int(i) = (0); (i) < (n); ++(i))
    for (int(j) = (i + 1); (j) < (n); ++(j)) {
      if ((a[j] > a[i] && a[j] < b[i]) && (b[j] < a[i] || b[j] > b[i])) {
        g[i].push_back(j);
        g[j].push_back(i);
        continue;
      }
      if ((b[j] > a[i] && b[j] < b[i]) && (a[j] < a[i] || a[j] > b[i])) {
        g[i].push_back(j);
        g[j].push_back(i);
        continue;
      }
    }
  for (int(i) = (0); (i) < (n); ++(i)) kol[i] = -1;
  for (int(i) = (0); (i) < (n); ++(i))
    if (kol[i] == -1) dfs(i, 0);
  bool ans = 1;
  for (int(i) = (0); (i) < (n); ++(i))
    for (int(j) = (0); (j) < (g[i].size()); ++(j))
      if (kol[i] == kol[g[i][j]]) ans = 0;
  if (!ans) {
    cout << "Impossible";
    return 0;
  }
  for (int(i) = (0); (i) < (n); ++(i))
    if (kol[i])
      cout << "o";
    else
      cout << "i";
  return 0;
}
