#include <bits/stdc++.h>
using namespace std;
const int mx = 300;
vector<int> adj[mx];
vector<pair<int, int> > v;
int col[mx];
bool dfs(int t, int c) {
  col[t] = c;
  for (int i = 0; i < adj[t].size(); i++) {
    int u = adj[t][i];
    if (!col[u]) {
      if (!dfs(u, 3 - c)) {
        return 0;
      }
    } else {
      if (col[u] == col[t]) {
        return 0;
      }
    }
  }
  return 1;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    if (a > b) {
      swap(a, b);
    }
    v.push_back(make_pair(a, b));
  }
  for (int i = 1; i < m; i++) {
    for (int j = 0; j < i; j++) {
      if ((v[i].first > v[j].first && v[i].first < v[j].second &&
           (v[i].second < v[j].first || v[i].second > v[j].second)) ||
          (v[i].second > v[j].first && v[i].second < v[j].second &&
           (v[i].first < v[j].first || v[i].second > v[j].second))) {
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    if (!col[i]) {
      if (!dfs(i, 1)) {
        cout << "Impossible";
        return 0;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    if (col[i] == 1) {
      cout << 'o';
    } else {
      cout << 'i';
    }
  }
}
