#include <bits/stdc++.h>
using namespace std;
struct ins {
  int ans;
  ins() { ans = 1; }
  void read() {}
  void read1(char &s) {
    char c = getchar();
    for (; !isprint(c) || c == ' ' || c == '\n' || c == '\t'; c = getchar())
      ;
    s = c;
    if (c == EOF) ans = 0;
  }
  void read1(string &s) {
    s = "";
    char c = getchar();
    for (; !isprint(c) || c == ' ' || c == '\n' || c == '\t'; c = getchar())
      ;
    for (; isprint(c) && c != ' ' && c != '\n' && c != '\t'; c = getchar())
      s += c;
    if (c == EOF) ans = 0;
  }
  void read1(char *s) {
    char c = getchar();
    int tt = 0;
    for (; !isprint(c) || c == ' ' || c == '\n' || c == '\t'; c = getchar())
      ;
    for (; isprint(c) && c != ' ' && c != '\n' && c != '\t'; c = getchar())
      s[tt++] = c;
    s[tt] = '\0';
    if (c == EOF) ans = 0;
  }
  template <typename T>
  void read1(T &n) {
    T x = 0;
    int f = 1;
    char c = getchar();
    for (; !isdigit(c); c = getchar()) {
      if (c == '-') f = -1;
      if (c == EOF) {
        ans = 0;
        return;
      }
    }
    for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
    n = x * f;
    if (c == EOF) ans = 0;
    if (c != '.') return;
    T l = 0.1;
    while ((c = getchar()) <= '9' && c >= '0') x = x + (c & 15) * l, l *= 0.1;
    n = x * f;
    if (c == EOF) ans = 0;
  }
  void write() {}
  void write1(string s) {
    int n = s.size();
    for (int i = 0; i < n; i++) putchar(s[i]);
  }
  void write1(const char *s) {
    int n = strlen(s);
    for (int i = 0; i < n; i++) putchar(s[i]);
  }
  void write1(char *s) {
    int n = strlen(s);
    for (int i = 0; i < n; i++) putchar(s[i]);
  }
  void write1(char s) { putchar(s); }
  void write1(float s, int x = 6) {
    char y[10001];
    sprintf(y, "%%.%df", x);
    printf(y, s);
  }
  void write1(double s, int x = 6) {
    char y[10001];
    sprintf(y, "%%.%dlf", x);
    printf(y, s);
  }
  void write1(long double s, int x = 6) {
    char y[10001];
    sprintf(y, "%%.%dLf", x);
    printf(y, s);
  }
  template <typename T>
  void write1(T n) {
    if (n < 0) n = -n, putchar('-');
    if (n > 9) write1(n / 10);
    putchar('0' + n % 10);
  }
  friend ins operator>>(ins x, char *n);
  template <typename T>
  friend ins operator>>(ins x, T &n);
  template <typename T>
  friend ins operator<<(ins x, T n);
  operator bool() { return ans; }
};
ins operator>>(ins x, char *n) {
  if (!x.ans) return x;
  x.read1(n);
  return x;
}
template <typename T>
ins operator>>(ins x, T &n) {
  if (!x.ans) return x;
  x.read1(n);
  return x;
}
template <typename T>
ins operator<<(ins x, T n) {
  x.write1(n);
  return x;
}
ins yin;
ins yout;
const int maxn = 1e3 + 10;
vector<int> e[maxn];
int x[maxn], y[maxn];
inline bool check(int i, int j) {
  int a1 = x[i], b1 = y[i], a2 = x[j], b2 = y[j];
  if (a1 == a2 || b1 == b2 || a2 == b1 || b2 == a1) return 0;
  if (b1 < a2 || b2 < a1) return 0;
  if (a1 < a2 && b2 < b1) return 0;
  if (a2 < a1 && b1 < b2) return 0;
  return 1;
}
int bel[maxn], dfn[maxn], num, low[maxn], in[maxn], col;
stack<int> s;
void tarjin(int u) {
  dfn[u] = low[u] = ++num;
  s.push(u);
  in[u] = 1;
  for (auto v : e[u]) {
    if (!dfn[v])
      tarjin(v), low[u] = min(low[u], low[v]);
    else if (in[v])
      low[u] = min(low[u], dfn[v]);
  }
  if (dfn[u] == low[u]) {
    int tmp;
    col++;
    do {
      tmp = s.top();
      s.pop();
      bel[tmp] = col;
      in[tmp] = 0;
    } while (u ^ tmp);
  }
}
int n, m;
int main() {
  yin >> n >> m;
  for (int i = 1; i <= m; i++) {
    yin >> x[i] >> y[i];
    if (x[i] > y[i]) swap(x[i], y[i]);
  }
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= m; j++)
      if (check(i, j)) e[i].push_back(j + m), e[i + m].push_back(j);
  for (int i = 1; i <= m; i++)
    if (!dfn[i]) tarjin(i);
  for (int i = 1; i <= m; i++)
    if (bel[i] == bel[i + m]) {
      puts("Impossible");
      return 0;
    }
  for (int i = 1; i <= m; i++)
    if (bel[i] < bel[i + m])
      yout << 'o';
    else
      yout << 'i';
  return 0;
}
