#include <bits/stdc++.h>
using namespace std;
class TwoSat {
  static const int ME = 1000010;
  static const int MV = 2010;
  struct G {
    struct E {
      int u, v, next;
    } e[ME];
    int le, head[MV];
    void init() {
      le = 0;
      memset(head, -1, sizeof(head));
    }
    void add(int u, int v) {
      e[le].u = u;
      e[le].v = v;
      e[le].next = head[u];
      head[u] = le++;
    }
  } g;
  class Tarjan {
    int Index, Bcnt, num[MV], belong[MV], dfn[MV], low[MV];
    bool instack[MV];
    stack<int> s;
    void tarjan(int u) {
      dfn[u] = low[u] = ++Index;
      instack[u] = true;
      s.push(u);
      int v;
      for (int i = g.head[u]; ~i; i = g.e[i].next) {
        v = g.e[i].v;
        if (!dfn[v]) {
          tarjan(v);
          low[u] = min(low[u], low[v]);
        } else if (instack[v]) {
          low[u] = min(low[u], dfn[v]);
        }
      }
      if (dfn[u] == low[u]) {
        Bcnt++;
        do {
          v = s.top();
          s.pop();
          instack[v] = false;
          belong[v] = Bcnt;
          num[Bcnt]++;
        } while (u != v);
      }
    }

   public:
    G g;
    void init() {
      g.init();
      Index = Bcnt = 0;
      memset(num, 0, sizeof(num));
      memset(dfn, 0, sizeof(dfn));
      memset(low, 0, sizeof(low));
      memset(instack, 0, sizeof(instack));
      while (!s.empty()) s.pop();
    }
    void add(int u, int v) { g.add(u, v); }
    void solve(int n) {
      for (int i = 1; i <= n; i++) {
        if (!dfn[i]) {
          tarjan(i);
        }
      }
    }
    int getbcnt() { return Bcnt; }
    int getbelong(int id) { return belong[id]; }
    int getnum(int id) { return num[id]; }
  } T;
  class Unitenode {
    G ug;
    int n, in[MV];
    bool mat[MV][MV];
    queue<int> q;

   public:
    void init(int tn) {
      n = tn;
      ug.init();
      memset(in, 0, sizeof(in));
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++) mat[i][j] = i == j ? true : false;
    }
    void add(int u, int v) {
      if (!mat[u][v]) {
        in[v]++;
        mat[u][v] = true;
        ug.add(u, v);
      }
    }
    void solve(int tp[]) {
      while (!q.empty()) q.pop();
      for (int i = 1; i <= n; i++) {
        if (!in[i]) {
          q.push(i);
        }
      }
      int ret = 1;
      while (!q.empty()) {
        int u = q.front();
        q.pop();
        tp[ret++] = u;
        for (int i = ug.head[u]; ~i; i = ug.e[i].next) {
          int v = ug.e[i].v;
          in[v]--;
          if (!in[v]) {
            q.push(v);
          }
        }
      }
    }
  } U;
  void unite() {
    U.init(T.getbcnt());
    for (int i = 1; i <= n; i++) {
      for (int j = T.g.head[i]; ~j; j = T.g.e[j].next) {
        U.add(T.getbelong(i), T.getbelong(T.g.e[j].v));
      }
    }
  }
  int n, tp[MV];
  bool flag[MV];

 public:
  void init(int tn) {
    n = tn;
    T.init();
  }
  void add(int u, int v) { T.add(u, v); }
  bool solve() {
    T.solve(n);
    for (int i = 1, z = n / 2; i <= z; i++) {
      if (T.getbelong(i) == T.getbelong(i + z)) return false;
    }
    return true;
  }
  void output(bool ans[]) {
    unite();
    U.solve(tp);
    memset(flag, 0, sizeof(flag));
    for (int i = T.getbcnt(); i > 0; i--) {
      for (int j = 1, y; j <= n; j++) {
        if (j > n / 2)
          y = j - n / 2;
        else
          y = j;
        if (!flag[y] && T.getbelong(j) == tp[i]) {
          flag[y] = true;
          if (j > n / 2) {
            ans[j - n / 2] = true;
          } else {
            ans[j] = false;
          }
        }
      }
    }
  }
} gx;
const int M = 128;
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;
}
bool 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.add(i, j + m);
          gx.add(j, i + m);
          gx.add(i + m, j);
          gx.add(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;
}
