#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const int INF = 1000 * 1000 * 1000;
vector<vector<int> > g;
vector<pair<int, int> > e;
char cl[111];
bool check(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first < b.first && a.second > b.first && a.second < b.second ||
         a.first > b.first && a.first < b.second && a.second > b.second;
}
bool bfs(int v) {
  queue<int> q;
  q.push(v);
  cl[v] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = (0); i < ((int)g[u].size()); ++i) {
      int to = g[u][i];
      if (cl[to] == cl[u]) {
        return false;
      } else if (cl[to] == 0) {
        cl[to] = 1;
        if (cl[u] == 1) {
          ++cl[to];
        }
        q.push(to);
      }
    }
  }
}
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  g.resize(M);
  for (int i = (0); i < (M); ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    e.push_back(make_pair(min(u - 1, v - 1), max(u - 1, v - 1)));
  }
  for (int i = (0); i < (M); ++i)
    for (int j = (0); j < (M); ++j)
      if (check(e[i], e[j])) {
        g[i].push_back(j);
      }
  for (int i = (0); i < (M); ++i)
    if (cl[i] == 0)
      if (!bfs(i)) {
        puts("Impossible");
        return 0;
      }
  for (int i = (0); i < (M); ++i) {
    printf(cl[i] == 1 ? "i" : "o");
  }
  return 0;
}
