#include <bits/stdc++.h>
using namespace std;
const int M = 1024;
const int maxn = 4024;
const int maxe = 1000000;
struct node {
  int from;
  int to;
  node *next;
};
class unitenode {
 private:
  node *head[maxn], edge[maxe];
  int mat[maxn][maxn], in[maxn], q[maxn];
  int n, numptr;

 public:
  void init(int tempn) {
    n = tempn;
    int i, j;
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= n; j++) {
        mat[i][j] = false;
      }
      mat[i][i] = true;
      head[i] = NULL;
      in[i] = 0;
    }
    numptr = 0;
  }
  void addedge(int from, int to) {
    if (mat[from][to] == false) {
      in[to]++;
      mat[from][to] = true;
      edge[numptr].from = from;
      edge[numptr].to = to;
      edge[numptr].next = head[from];
      head[from] = &edge[numptr++];
    }
  }
  void solve(int tp[]) {
    int i, ret = 1, x, j, h, tail;
    h = tail = 0;
    for (i = 1; i <= n; i++) {
      if (in[i] == 0) {
        q[tail++] = i;
      }
    }
    while (h != tail) {
      x = q[h++];
      tp[ret++] = x;
      for (node *ptr = head[x]; ptr; ptr = ptr->next) {
        in[ptr->to]--;
        if (in[ptr->to] == 0) {
          q[tail++] = ptr->to;
        }
      }
    }
  }
} u;
class find_components {
 private:
  node *head[maxn], edge[maxe];
  node *head2[maxn], edge2[maxe];
  bool flag[maxn];
  int num[maxn], times, numptr, n, tp[maxn];

 private:
  void dfs1(int x) {
    flag[x] = true;
    node *ptr;
    for (ptr = head[x]; ptr; ptr = ptr->next) {
      if (!flag[ptr->to]) dfs1(ptr->to);
    }
    num[++times] = x;
  }
  void dfs2(int x) {
    flag[x] = true;
    scc[x] = sig;
    node *ptr;
    for (ptr = head2[x]; ptr; ptr = ptr->next) {
      if (!flag[ptr->to]) dfs2(ptr->to);
    }
  }

 public:
  int scc[maxn];
  int sig;
  void init(int tempn) {
    int i;
    for (i = 0; i < maxn; i++) {
      head[i] = head2[i] = NULL;
    }
    numptr = 0;
    n = tempn;
  }
  void addedge(int from, int to) {
    edge[numptr].from = from;
    edge[numptr].to = to;
    edge[numptr].next = head[from];
    head[from] = &edge[numptr];
    edge2[numptr].from = to;
    edge2[numptr].to = from;
    edge2[numptr].next = head2[to];
    head2[to] = &edge2[numptr];
    numptr++;
  }
  bool solve() {
    int i, z = n / 2;
    for (i = 0; i < maxn; i++) flag[i] = false;
    times = 0;
    for (i = 1; i <= n; i++) {
      if (!flag[i]) {
        dfs1(i);
      }
    }
    for (i = 0; i < maxn; i++) flag[i] = false;
    sig = 0;
    for (i = n; i; i--) {
      if (!flag[num[i]]) {
        ++sig;
        dfs2(num[i]);
      }
    }
    for (i = 1; i <= z; i++) {
      if (scc[i] == scc[i + z]) return false;
    }
    return true;
  }
  void unite() {
    u.init(sig);
    int i;
    node *ptr;
    for (i = 1; i <= n; i++) {
      for (ptr = head[i]; ptr; ptr = ptr->next) {
        u.addedge(scc[i], scc[ptr->to]);
      }
    }
  }
  void output(int ans[]) {
    unite();
    int i, j, x, y;
    u.solve(tp);
    for (i = 1; i <= n; i++) flag[i] = true;
    for (i = sig; i > 0; i--) {
      for (j = 1; j <= n; j++) {
        if (j > n / 2)
          y = j - n / 2;
        else
          y = j;
        if (flag[y] && scc[j] == tp[i]) {
          flag[y] = false;
          if (j > n / 2) {
            ans[j - n / 2] = 1;
          } else {
            ans[j] = 0;
          }
        }
      }
    }
  }
} gx;
struct IN {
  int x, y;
} in[M];
bool ok(int i, int j) {
  if (in[i].x < in[j].x && in[j].x < in[i].y && in[i].y < in[j].y) return true;
  return false;
}
bool judge(int i, int j) {
  if (ok(i, j) || ok(j, i)) return true;
  return false;
}
int ans[M];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    gx.init(m * 2);
    for (int i = 1; i <= m; i++) {
      scanf("%d%d", &in[i].x, &in[i].y);
      if (in[i].x > in[i].y) swap(in[i].x, in[i].y);
    }
    for (int i = 1; i <= m; i++) {
      for (int j = i + 1; j <= m; j++) {
        if (judge(i, j)) {
          gx.addedge(i, j + m);
          gx.addedge(j, i + m);
          gx.addedge(i + m, j);
          gx.addedge(j + m, i);
        }
      }
    }
    if (gx.solve()) {
      gx.output(ans);
      for (int i = 1; i <= m; i++) {
        if (ans[i])
          printf("i");
        else
          printf("o");
      }
      puts("");
    } else {
      puts("Impossible");
    }
  }
  return 0;
}
