#include <bits/stdc++.h>
using namespace std;
struct Twosat {
  int n;
  vector<int> G[200 * 2];
  bool mark[200 * 2];
  int s[200 * 2], c;
  bool dfs(int x) {
    if (mark[x ^ 1]) return 0;
    if (mark[x]) return 1;
    mark[x] = 1;
    s[c++] = x;
    for (int i = 0; i < G[x].size(); i++) {
      if (!dfs(G[x][i])) return 0;
    }
    return 1;
  }
  void init(int n) {
    this->n = n;
    for (int i = 0; i < n * 2; i++) G[i].clear();
    memset(mark, 0, sizeof(mark));
  }
  void add(int x, int xval, int y, int yval) {
    x = x * 2 + xval;
    y = y * 2 + yval;
    G[x ^ 1].push_back(y);
    G[y ^ 1].push_back(x);
  }
  bool solve() {
    for (int i = 0; i < n * 2; i += 2) {
      if (!mark[i] && !mark[i + 1]) {
        c = 0;
        if (!dfs(i)) {
          while (c > 0) mark[s[--c]] = 0;
          if (!dfs(i + 1)) return 0;
        }
      }
    }
    return 1;
  }
} sat;
typedef struct {
  int x, y;
} node;
node p[200];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  sat.init(n);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    p[i].x = x;
    p[i].y = y;
  }
  for (int i = 0; i < m; i++)
    for (int j = i + 1; j < m; j++) {
      if (min(p[i].x, p[i].y) > min(p[j].x, p[j].y) &&
          min(p[i].x, p[i].y) < max(p[j].x, p[j].y) &&
          max(p[i].x, p[i].y) > max(p[j].x, p[j].y)) {
        sat.add(i, 1, j, 1);
        sat.add(i, 0, j, 0);
      }
      if (min(p[i].x, p[i].y) < min(p[j].x, p[j].y) &&
          max(p[i].x, p[i].y) > min(p[j].x, p[j].y) &&
          max(p[i].x, p[i].y) < max(p[j].x, p[j].y)) {
        sat.add(i, 1, j, 1);
        sat.add(i, 0, j, 0);
      }
    }
  if (!sat.solve())
    printf("Impossible");
  else {
    for (int i = 0; i < m; i++)
      if (sat.mark[2 * i])
        printf("i");
      else
        printf("o");
  }
}
