#include <bits/stdc++.h>
using namespace std;
const int N = 4000 + 7;
const int M = 90;
const int inf = 1e9 + 7;
const long long base = 1e18;
const double pi = acos(-1);
const double ep = 1e-9;
int num[N], low[N];
int cnt;
stack<int> st;
int check[N];
vector<int> adj[N];
int pa[N], cs[N];
int k = 0;
int n;
int fin[N];
int ff = 0;
int m;
void DFS(int u) {
  low[u] = num[u] = ++cnt;
  st.push(u);
  for (int j = 0; j < adj[u].size(); j++) {
    int v = adj[u][j];
    if (cs[v] > 0) continue;
    if (num[v] == 0) {
      pa[v] = u;
      DFS(v);
      low[u] = min(low[u], low[v]);
    } else
      low[u] = min(low[u], num[v]);
  }
  if (low[u] == num[u]) {
    ++k;
    int v;
    do {
      v = st.top();
      st.pop();
      cs[v] = k;
    } while (v != u);
  }
  fin[u] = ++ff;
}
int g(int x) { return x + m; }
int add(int u, int v) { adj[u].push_back(v); }
pair<int, int> a[N];
bool inside(pair<int, int> u, int x) { return (x > u.first && x < u.second); }
bool intersect(pair<int, int> u, pair<int, int> v) {
  if (u.first == v.first || u.first == v.second || u.second == v.first ||
      u.second == v.second)
    return false;
  if (inside(u, v.second) && !inside(u, v.first)) return true;
  if (inside(u, v.first) && !inside(u, v.second)) return true;
  return false;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i < m + 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    if (u > v) swap(u, v);
    a[i] = make_pair(u, v);
    for (int j = 1; j < i; j++)
      if (intersect(a[i], a[j])) {
        add(i, g(j));
        add(j, g(i));
        add(g(i), j);
        add(g(j), i);
      }
  }
  for (int i = 1; i < 2 * m + 1; i++)
    if (pa[i] == 0) {
      pa[i] = -1;
      DFS(i);
    }
  for (int i = 1; i < m + 1; i++) {
    if (cs[i] == cs[g(i)]) {
      cout << "Impossible";
      return 0;
    }
  }
  vector<int> ans;
  for (int i = 1; i < m + 1; i++)
    if (fin[g(i)] <= fin[i]) {
      cout << "i";
    } else
      cout << "o";
}
