#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int inf = 1e9;
int mod = 1e9 + 7;
bool inside(int x, int y, int u) {
  if (x > y) {
    swap(x, y);
  }
  if (u >= x && u <= y) {
    return true;
  }
  return false;
}
struct SCC {
  int n, nScc;
  vector<int> visited, idx, order;
  vector<vector<int>> graph, rgraph;
  SCC(int _n = N) {
    n = _n;
    graph.resize(n + 1);
    rgraph.resize(n + 1);
    visited.resize(n + 1);
    idx.resize(n + 1);
    order.resize(n + 1);
    for (int i = 0; i <= n; i++) {
      graph[i].clear();
      rgraph[i].clear();
    }
  }
  void add_edge(int u, int v) {
    graph[u].push_back(v);
    rgraph[v].push_back(u);
  }
  void DFS(int u) {
    visited[u] = 1;
    for (auto v : graph[u]) {
      if (!visited[v]) {
        DFS(v);
      }
    }
    order.push_back(u);
  }
  void rDFS(int u) {
    visited[u] = 1;
    idx[u] = nScc;
    for (auto v : rgraph[u]) {
      if (!visited[v]) {
        rDFS(v);
      }
    }
  }
  void solve() {
    nScc = 0;
    order.clear();
    for (int i = 1; i <= n; i++) {
      visited[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      if (!visited[i]) {
        DFS(i);
      }
    }
    reverse(order.begin(), order.end());
    for (int i = 1; i <= n; i++) {
      visited[i] = 0;
    }
    for (auto v : order) {
      if (!visited[v]) {
        rDFS(v);
        nScc++;
      }
    }
  }
};
signed main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> graph;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    graph.push_back({u, v});
  }
  SCC scc(2 * m + 1);
  int NOT[2 * m];
  for (int i = 0; i < m; i++) {
    NOT[i] = i + m;
    NOT[i + m] = i;
  }
  for (int i = 0; i < m; i++) {
    int x = graph[i].first;
    int y = graph[i].second;
    for (int j = i + 1; j < m; j++) {
      int u = graph[j].first;
      int v = graph[j].second;
      if (x == u || x == v || y == u || y == v) {
        continue;
      }
      if ((inside(x, y, u) && !inside(x, y, v)) ||
          (inside(x, y, v) && !inside(x, y, u))) {
        scc.add_edge(NOT[i], j);
        scc.add_edge(NOT[j], i);
        scc.add_edge(i, NOT[j]);
        scc.add_edge(j, NOT[i]);
      }
    }
  }
  scc.solve();
  for (int i = 0; i < m; i++) {
    if (scc.idx[i] == scc.idx[NOT[i]]) {
      cout << "Impossible\n";
      return 0;
    }
  }
  reverse(scc.order.begin(), scc.order.end());
  vector<int> ans(2 * m, -1);
  for (int x : scc.order) {
    if (ans[x] == -1) {
      ans[x] = 0;
      ans[NOT[x]] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    if (ans[i]) {
      cout << "i";
    } else {
      cout << "o";
    }
  }
  return 0;
}
