#include <bits/stdc++.h>
using namespace std;
namespace Twosat {
const int M = 4000010, N = 1000010;
struct edge {
  int next, point;
  edge(int n_ = 0, int p_ = 0) : next(n_), point(p_) {}
} e[M];
int n, len, now, sign, head, sign2;
int p[N << 1], dfs[N << 1], low[N << 1], where[N << 1];
int s[N << 1], in[N << 1], ans[N], out[N << 1];
void add(int k1, int k2) {
  e[++len] = edge(p[k1], k2);
  p[k1] = len;
}
void init(int _n) {
  n = _n;
  for (int i = 0; i <= n * 2 + 1; i++) {
    p[i] = where[i] = dfs[i] = low[i] = s[i] = in[i] = out[i] = 0;
  }
  len = now = sign = head = sign2 = 0;
}
void tarjan(int k1) {
  s[++head] = k1;
  in[k1] = 1;
  dfs[k1] = ++sign;
  low[k1] = sign;
  for (int i = p[k1]; i; i = e[i].next) {
    int j = e[i].point;
    if (dfs[j] == 0) {
      tarjan(j);
      low[k1] = min(low[k1], low[j]);
    } else if (in[j]) {
      low[k1] = min(low[k1], dfs[j]);
    }
  }
  if (dfs[k1] == low[k1]) {
    now++;
    while (1) {
      where[s[head]] = now;
      in[s[head]] = 0;
      out[s[head]] = ++sign2;
      head--;
      if (s[head + 1] == k1) {
        break;
      }
    }
  }
}
int solve() {
  for (int i = 1; i <= n * 2; i++) {
    if (dfs[i] == 0) {
      tarjan(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (where[i] == where[i + n]) {
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (out[i] < out[i + n]) {
      ans[i] = 0;
    } else {
      ans[i] = 1;
    }
  }
  return 1;
}
}  // namespace Twosat
bool intersect(pair<int, int> a, pair<int, int> b) {
  if (a > b) {
    swap(a, b);
  }
  return (b.first < a.second && b.second > a.second && b.first > a.first);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> pr(m);
  vector<pair<int, int>> rp;
  for (auto& i : pr) {
    cin >> i.first >> i.second;
    if (i.first > i.second) {
      swap(i.first, i.second);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      if (intersect(pr[i], pr[j])) {
        rp.push_back({i + 1, j + 1});
      }
    }
  }
  Twosat::init(m);
  for (auto i : rp) {
    Twosat::add(i.first + m, i.second);
    Twosat::add(i.second + m, i.first);
    Twosat::add(i.second, i.first + m);
    Twosat::add(i.first, i.second + m);
  }
  if (Twosat::solve()) {
    for (int i = 1; i <= m; i++) {
      cout << (Twosat::ans[i] ? "i" : "o");
    }
  } else {
    cout << "Impossible";
  }
  return 0;
}
