#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
const int maxn = 500;
int m, n, x[maxn], y[maxn];
void ReadData() {
  cin >> m >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    if (x[i] > y[i]) swap(x[i], y[i]);
  }
}
bool check(int a, int b, int c, int d) {
  if (c > a && c < b && ((d > b && d <= m) || (d >= 1 && d < a))) return true;
  if (d > a && d < b && ((c > b && c <= m) || (c >= 1 && c < a))) return true;
  return false;
}
struct Graph {
  int n;
  vector<int> V[maxn];
  stack<int> sta;
  int low[maxn], num[maxn], timer;
  bool deleted[maxn];
  vector<int> components[maxn];
  int belong[maxn], nscc = 0;
  int mark[maxn];
  int degIn[maxn], degOut[maxn];
  Graph() {}
  Graph(int _n) {
    n = _n;
    timer = 0;
  }
  void Addedge(int u, int v) {
    V[u].push_back(v);
    V[v].push_back(u);
    degIn[v]++;
    degOut[u]++;
  }
  inline void dfs(const int u) {
    sta.push(u);
    low[u] = num[u] = ++timer;
    for (int i = 0; i < ((int)V[u].size()); i++) {
      int v = V[u][i];
      if (deleted[v]) continue;
      if (num[v])
        low[u] = min(low[u], num[v]);
      else {
        dfs(v);
        low[u] = min(low[u], low[v]);
      }
    }
    if (low[u] >= num[u]) {
      nscc++;
      int v;
      while (true) {
        v = sta.top();
        sta.pop();
        deleted[v] = true;
        components[nscc].push_back(v);
        belong[v] = nscc;
        if (v == u) break;
      }
    }
  }
  void SolveFirst() {
    for (int i = 1; i <= n; i++)
      if (!num[i]) dfs(i);
  }
} G, G2;
vector<int> V[maxn];
int degIn[maxn], degOut[maxn];
void Fail() {
  cout << "Impossible" << endl;
  exit(0);
}
int mark[maxn];
int topo[maxn];
int cnt = 0;
void dfs(int u) {
  mark[u] = 1;
  for (int i = 0; i < ((int)V[u].size()); i++) {
    int v = V[u][i];
    if (!mark[v]) {
      dfs(v);
    }
  }
  topo[u] = cnt++;
}
void Process() {
  G = Graph(n * 2 + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i - 1; j++)
      if (check(x[i], y[i], x[j], y[j])) {
        G.Addedge(i * 2 + 1, j * 2);
        G.Addedge(j * 2 + 1, i * 2);
        G.Addedge(i * 2, j * 2 + 1);
        G.Addedge(j * 2 + 1, i * 2);
      }
  G.SolveFirst();
  for (int i = 1; i <= n; i++)
    if (G.belong[i * 2] == G.belong[i * 2 + 1]) return Fail();
  G2 = Graph(G.nscc);
  for (int i = 1; i <= G.nscc; i++) {
    for (int j = 0; j < ((int)G.V[i].size()); j++) {
      int z = G.V[i][j];
      if (G.belong[z] != G.belong[i]) {
        V[G.belong[z]].push_back(G.belong[i]);
        degOut[G.belong[z]]++;
        degIn[G.belong[i]]++;
      }
    }
  }
  for (int i = 1; i <= G.nscc; i++)
    if (degIn[i] == 0) dfs(i);
  for (int i = 1; i <= n; i++) {
    int x = G.belong[i * 2], y = G.belong[i * 2 + 1];
    if (topo[x] > topo[y])
      cout << 'i';
    else
      cout << 'o';
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ReadData();
  Process();
}
