#include <bits/stdc++.h>
using namespace std;
const int maxn = 200 + 10;
int n, m, c, col[maxn], sel[maxn];
vector<int> ve[maxn], vr[maxn], fn, comp[maxn], vc[maxn], fnc;
bool mark[maxn];
pair<int, int> edge[maxn];
void dfs(int x) {
  mark[x] = 1;
  for (int i = 0; i < ve[x].size(); i++)
    if (!mark[ve[x][i]]) dfs(ve[x][i]);
  fn.push_back(x);
}
void dfs2(int x) {
  mark[x] = 1;
  col[x] = c;
  comp[c].push_back(x);
  for (int i = 0; i < vr[x].size(); i++)
    if (!mark[vr[x][i]]) dfs2(vr[x][i]);
}
void dfs3(int x) {
  sel[x] = 2;
  for (int i = 0; i < vc[x].size(); i++)
    if (!sel[vc[x][i]]) dfs3(vc[x][i]);
}
void go(int x) {
  for (int i = 0; i < comp[x].size(); i++) {
    int a = comp[x][i];
    if (a > m && !sel[col[a - m]])
      dfs3(col[a - m]);
    else if (a <= m && !sel[col[a + m]])
      dfs3(col[a + m]);
    break;
  }
}
bool in(int a, int x, int b) {
  if (a < x && x < b) return 1;
  return 0;
}
bool check(int a, int b, int x, int y) {
  if (b < a) swap(a, b);
  if (y < x) swap(x, y);
  if ((in(x, b, y) && !in(x, a, y) && a != x) ||
      (in(a, y, b) && !in(a, x, b) && x != a))
    return 1;
  return 0;
}
void dfs4(int x) {
  mark[x] = 1;
  for (int i = 0; i < vc[x].size(); i++)
    if (!mark[vc[x][i]]) dfs4(vc[x][i]);
  fnc.push_back(x);
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    edge[i].first = a;
    edge[i].second = b;
  }
  for (int i = 1; i <= m; i++)
    for (int j = 1; j < i; j++) {
      int a1 = edge[i].first;
      int b1 = edge[i].second;
      int a2 = edge[j].first;
      int b2 = edge[j].second;
      if (check(a1, b1, a2, b2)) {
        ve[i + m].push_back(j);
        ve[j + m].push_back(i);
        ve[i].push_back(j + m);
        ve[j].push_back(i + m);
        vr[i + m].push_back(j);
        vr[j + m].push_back(i);
        vr[i].push_back(j + m);
        vr[j].push_back(i + m);
      }
    }
  for (int i = 1; i <= 2 * m; i++)
    if (!mark[i]) dfs(i);
  memset(mark, 0, sizeof mark);
  for (int i = fn.size() - 1; i >= 0; i--)
    if (!mark[fn[i]]) {
      c++;
      dfs2(fn[i]);
    }
  for (int i = 1; i <= m; i++)
    if (col[i] == col[i + m]) {
      cout << "Impossible\n";
      return 0;
    }
  for (int i = 1; i <= m; i++)
    for (int j = 1; j < i; j++) {
      int a = col[i];
      int b = col[j];
      int x = col[i + m];
      int y = col[j + m];
      int a1 = edge[i].first;
      int b1 = edge[i].second;
      int a2 = edge[j].first;
      int b2 = edge[j].second;
      if (a != y && b != x && check(a1, b1, a2, b2)) {
        vc[a].push_back(y);
        vc[b].push_back(x);
        vc[x].push_back(b);
        vc[y].push_back(a);
      }
    }
  memset(mark, 0, sizeof mark);
  for (int i = 1; i <= c; i++)
    if (!mark[i]) dfs4(i);
  for (int i = fnc.size() - 1; i >= 0; i--) {
    if (!sel[fnc[i]]) {
      sel[fnc[i]] = 1;
      go(fnc[i]);
    }
  }
  for (int i = 1; i <= m; i++)
    if (sel[col[i]] == 1)
      cout << 'i';
    else
      cout << 'o';
  cout << endl;
  return 0;
}
