#include <bits/stdc++.h>
using namespace std;
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int n, m, id;
vector<int> G[201], RG[201];
stack<int> st;
int vis[201], A[101], B[101], arr[101];
inline int node(int u) {
  if (u > 0) return 2 * u - 1;
  return -2 * u;
}
inline int compliment(int u) {
  if (u < 0) return -2 * u - 1;
  return 2 * u;
}
void dfs1(int s) {
  vis[s] = 1;
  for (int i = 0; i < G[s].size(); i++) {
    int u = G[s][i];
    if (!vis[u]) dfs1(u);
  }
  st.push(s);
}
void dfs2(int s) {
  vis[s] = id;
  for (int i = 0; i < RG[s].size(); i++) {
    int u = RG[s][i];
    if (!vis[u]) dfs2(u);
  }
}
bool solve_2SAT() {
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= 2 * m; i++)
    if (!vis[i]) dfs1(i);
  memset(vis, 0, sizeof(vis));
  id = 1;
  while (!st.empty()) {
    int u = st.top();
    st.pop();
    if (!vis[u]) dfs2(u), id++;
  }
  for (int i = 1; i <= m; i++) {
    if (vis[i] == vis[i + m]) return false;
    if (vis[i] > vis[i + m]) arr[i] = 1;
  }
  return true;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> A[i] >> B[i];
    if (A[i] > B[i]) swap(A[i], B[i]);
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= m; j++) {
      if (i == j) continue;
      int c = 0;
      int k = A[i];
      while (1) {
        if (k > n) k = 1;
        if (c == 0 and k == B[i]) break;
        if (k == A[j] or k == B[j]) c++;
        if (c == 2 or k == B[i]) break;
        k++;
      }
      if (c == 1 and (A[i] == A[j] or A[i] == B[j])) c--;
      if (c == 1) {
        G[i + m].push_back(j);
        G[i].push_back(j + m);
        G[j + m].push_back(i);
        G[j].push_back(i + m);
        RG[i + m].push_back(j);
        RG[i].push_back(j + m);
        RG[j + m].push_back(i);
        RG[j].push_back(i + m);
      }
    }
  }
  if (solve_2SAT()) {
    for (int i = 1; i <= m; i++) {
      if (arr[i])
        cout << 'i';
      else
        cout << 'o';
    }
  } else
    cout << "Impossible";
}
