#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const double EPS = 1e-8;
const long long INF = 1000000000 + 5;
const int MAXN2 = 1e3 + 5;
vector<int> g[MAXN], gr[MAXN];
int x[MAXN], y[MAXN];
bool visited[MAXN];
stack<int> st;
int comp[MAXN];
int res[MAXN];
void dfs(int v) {
  visited[v] = true;
  int sz = g[v].size();
  for (int i = 0; i < sz; i++) {
    int to = g[v][i];
    if (!visited[to]) dfs(to);
  }
  st.push(v);
}
void dfs2(int v) {
  visited[v] = true;
  int sz = gr[v].size();
  for (int i = 0; i < sz; i++) {
    int to = gr[v][i];
    if (!visited[to]) {
      comp[to] = comp[v];
      dfs2(to);
    }
  }
}
void add_edge(int val1, int val2, int v, int v2, int to, int to2) {
  if (val1) {
    if (val2) {
      g[v2].push_back(to);
      g[to2].push_back(v);
      gr[to].push_back(v2);
      gr[v].push_back(to2);
    } else {
      g[v2].push_back(to2);
      g[to].push_back(v);
      gr[to2].push_back(v2);
      gr[v].push_back(to);
    }
  } else {
    if (val2) {
      g[v].push_back(to);
      g[to2].push_back(v2);
      gr[to].push_back(v);
      gr[v2].push_back(to2);
    } else {
      g[v].push_back(to2);
      g[to].push_back(v2);
      gr[to2].push_back(v);
      gr[v2].push_back(to);
    }
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i]--;
    y[i]--;
  }
  for (int i = 0; i < m; i++) {
    int l1 = min(x[i], y[i]), r1 = max(x[i], y[i]);
    for (int j = i + 1; j < m; j++) {
      int l2 = min(x[j], y[j]), r2 = max(x[j], y[j]);
      if (l1 < l2 && l2 < r1 && r1 < r2 || l2 < l1 && l1 < r2 && r2 < r1) {
        add_edge(1, 1, i * 2, (i * 2) ^ 1, j * 2, (j * 2) ^ 1);
        add_edge(0, 0, i * 2, (i * 2) ^ 1, j * 2, (j * 2) ^ 1);
      }
    }
  }
  int n2 = (m - 1) * 2 + 2;
  for (int i = 0; i < n2; i++) {
    if (!visited[i]) {
      dfs(i);
    }
  }
  for (int i = 0; i < n2; i++) visited[i] = false;
  int cur = 0;
  while (!st.empty()) {
    int v = st.top();
    st.pop();
    if (!visited[v]) {
      comp[v] = ++cur;
      dfs2(v);
    }
  }
  for (int i = 0; i < m; i++) {
    int v = i * 2;
    int to = (i * 2) ^ 1;
    if (comp[v] == comp[to]) {
      printf("Impossible");
      return 0;
    } else {
      if (comp[v] > comp[to]) {
        res[i] = 1;
      } else
        res[i] = 2;
    }
  }
  for (int i = 0; i < m; i++) {
    if (res[i] == 1)
      printf("i");
    else
      printf("o");
  }
  return 0;
}
