#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > graph;
vector<int> color, number, low, vertices, comp, poss, order;
int t = 0, compid = 0;
void tarjan(int v) {
  number[v] = t;
  low[v] = t;
  t++;
  vertices.push_back(v);
  color[v] = 1;
  for (int u : graph[v]) {
    if (color[u] == 2) continue;
    if (color[u] == 0) tarjan(u);
    low[v] = min(low[v], low[u]);
  }
  if (low[v] == number[v]) {
    while (!vertices.empty()) {
      int u = vertices.back();
      vertices.pop_back();
      color[u] = 2;
      order.push_back(u);
      comp[u] = compid;
      if (v == u) break;
    }
    compid++;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  int a, b;
  vector<pair<int, int> > v;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    if (a < b) {
      v.push_back(make_pair(a, b));
    } else {
      v.push_back(make_pair(b, a));
    }
  }
  int size = 2 * m;
  graph.resize(size);
  string result = "";
  for (int i = 0; i < m; i++) {
    result = result + 'i';
    for (int j = i + 1; j < m; j++) {
      pair<int, int> x, y;
      if (v[i] < v[j]) {
        x = v[i];
        y = v[j];
      } else {
        x = v[j];
        y = v[i];
      }
      if ((y.first > x.first) && (y.first < x.second) &&
          (y.second > x.second)) {
        graph[i + m].push_back(j);
        graph[i].push_back(j + m);
        graph[j].push_back(i + m);
        graph[j + m].push_back(i);
      }
    }
  }
  color.resize(size, 0);
  low.resize(size, -1);
  number.resize(size, -1);
  comp.resize(size);
  poss.resize(size, 0);
  for (int i = 0; i < size; i++) {
    if (color[i] == 0) tarjan(i);
  }
  for (int i = 0; i < m; i++) {
    if (comp[i] == comp[i + m]) {
      printf("Impossible\n");
      return 0;
    }
  }
  bitset<200> chosen;
  chosen.reset();
  for (int i = 0; i < (int)order.size(); i++) {
    int u = order[i];
    if (!chosen[u]) {
      if (u > m) {
        result[u - m] = 'o';
        chosen[u] = 1;
        chosen[u - m] = 1;
      } else {
        result[u] = 'i';
        chosen[u] = 1;
        chosen[u + m] = 1;
      }
    }
  }
  cout << result << endl;
  return 0;
}
