#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
const int INF = 1 << 29;
const int MAXN = 105;
int n, m, a, b;
pair<int, int> E[MAXN], A[MAXN];
vector<int> adj[MAXN];
int V[MAXN];
bool possible;
int dist(int i1, int i2) { return (i2 + n - i1) % n; }
bool intersect(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first == p2.first || p1.first == p2.second || p1.second == p2.first ||
      p1.second == p2.second)
    return false;
  if (dist(p1.first, p2.first) < dist(p1.first, p1.second))
    return !(dist(p1.first, p2.second) < dist(p1.first, p1.second));
  if (dist(p1.second, p2.first) < dist(p1.second, p1.first))
    return !(dist(p1.second, p2.second) < dist(p1.second, p1.first));
  return false;
}
int find(pair<int, int> p) { return lower_bound(E, E + m, p) - E; }
void dfs(int ind, int val) {
  if (!possible) {
    return;
  }
  if (V[ind] != -1) {
    possible = (V[ind] == val);
    return;
  }
  V[ind] = val;
  for (int i = 0; i < (int)adj[ind].size(); i++) {
    dfs(adj[ind][i], (val + 1) % 2);
  }
}
int main(int argc, char** argv) {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    a--;
    b--;
    A[i] = pair<int, int>(a, b);
    E[i] = pair<int, int>(a, b);
  }
  sort(E, E + m);
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      if (intersect(E[i], E[j])) {
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    V[i] = -1;
  }
  possible = true;
  for (int i = 0; i < m; i++) {
    if (V[i] == -1) {
      dfs(i, 0);
    }
  }
  if (possible) {
    for (int i = 0; i < m; i++) {
      int ind = find(A[i]);
      if (V[ind] == 0) {
        printf("i");
      } else {
        printf("o");
      }
    }
    printf("\n");
  } else {
    printf("Impossible\n");
  }
  return 0;
}
