#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> input[100];
vector<int> edges[200];
bool chosen[200];
void color_dependencies(int me) {
  for (int son : edges[me])
    if (!chosen[son]) chosen[son] = true, color_dependencies(son);
}
bool is_bipartite() {
  for (int i = 0; i < m; ++i)
    if (!chosen[i] && !chosen[m + i]) chosen[i] = true, color_dependencies(i);
  for (int i = 0; i < m; ++i)
    if (chosen[i] && chosen[m + i]) return false;
  return true;
}
bool intersect(const pair<int, int>& p1, const pair<int, int>& p2) {
  if (p1.first == p2.first || p1.first == p2.second) return false;
  if (p1.second == p2.first || p1.second == p2.second) return false;
  if (p1.first < p2.first && p2.first < p1.second && p1.second < p2.second)
    return true;
  if (p2.first < p1.first && p1.first < p2.second && p2.second < p1.second)
    return true;
  return false;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> input[i].first >> input[i].second;
    if (input[i].first > input[i].second) swap(input[i].first, input[i].second);
  }
  for (int me = 0; me < m; ++me)
    for (int enemy = me + 1; enemy < m; ++enemy)
      if (intersect(input[me], input[enemy]))
        edges[me].push_back(m + enemy), edges[m + enemy].push_back(me),
            edges[enemy].push_back(m + me), edges[m + me].push_back(enemy);
  if (!is_bipartite())
    cout << "Impossible";
  else
    for (int i = 0; i < m; ++i)
      if (chosen[i])
        cout << 'i';
      else
        cout << 'o';
  cout << endl;
  return 0;
}
