#include <bits/stdc++.h>
using namespace std;
int n, m;
struct Edge {
  int from, to, next;
} edge1[2015], edge2[2015];
int head1[2015], head2[2015];
int num_edge1, num_edge2;
void add_Edge(int from, int to, int &num_edge, Edge *edge, int *head) {
  int t = ++num_edge;
  edge[t].from = from;
  edge[t].to = to;
  edge[t].next = head[from];
  head[from] = t;
}
int dfs_clocks, num_scc;
int lowlink[2015], pre[2015], sccbelong[2015];
vector<int> sccown[2015];
stack<int> st;
void tarjan_dfs(int now) {
  lowlink[now] = pre[now] = ++dfs_clocks;
  st.push(now);
  for (int i = head1[now]; i != -1; i = edge1[i].next) {
    int to = edge1[i].to;
    if (!pre[to]) {
      tarjan_dfs(to);
      lowlink[now] = min(lowlink[now], lowlink[to]);
    } else if (!sccbelong[to]) {
      lowlink[now] = min(lowlink[now], pre[to]);
    }
  }
  if (lowlink[now] == pre[now]) {
    num_scc += 1;
    sccown[num_scc].clear();
    int x;
    do {
      x = st.top();
      st.pop();
      sccbelong[x] = num_scc;
      sccown[num_scc].push_back(x);
    } while (x != now);
  }
}
void tarjan() {
  for (int i = 1; i <= m << 1; i++) {
    lowlink[i] = pre[i] = sccbelong[i] = 0;
  }
  while (!st.empty()) st.pop();
  num_scc = dfs_clocks = 0;
  for (int i = 1; i <= m << 1; i++) {
    if (!pre[i]) tarjan_dfs(i);
  }
}
int enermy[2015], indegree[2015];
bool vis[2015];
queue<int> q, topq;
void Topo() {
  while (!q.empty()) q.pop();
  for (int i = 1; i <= num_scc; i++) {
    if (!indegree[i]) q.push(i);
  }
  while (!topq.empty()) topq.pop();
  while (!q.empty()) {
    int now = q.front();
    q.pop();
    topq.push(now);
    for (int i = head2[now]; i != -1; i = edge2[i].next) {
      int to = edge2[i].to;
      indegree[to] -= 1;
      if (!indegree[to]) q.push(to);
    }
  }
}
struct Data {
  int a, b;
  int ans;
} data[2015];
bool intersect(Data x, Data y) {
  int now = x.a + 1, num = 0;
  while (now != x.b) {
    if (now == y.a || now == y.b) num += 1;
    now += 1;
  }
  if (num != 1) return false;
  now = x.b + 1;
  if (now > n) now = 1;
  num = 0;
  while (now != x.a) {
    if (now == y.a || now == y.b) num += 1;
    now += 1;
    if (now > n) now = 1;
  }
  if (num != 1) return false;
  return true;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &data[i].a, &data[i].b);
    if (data[i].a > data[i].b) swap(data[i].a, data[i].b);
    head1[2 * i - 1] = -1;
    head1[2 * i] = -1;
  }
  num_edge1 = 0;
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j < i; j++) {
      if (intersect(data[i], data[j])) {
        int x1 = 2 * i - 1, x2 = 2 * i;
        int y1 = 2 * j - 1, y2 = 2 * j;
        add_Edge(x1, y2, num_edge1, edge1, head1);
        add_Edge(x2, y1, num_edge1, edge1, head1);
        add_Edge(y1, x2, num_edge1, edge1, head1);
        add_Edge(y2, x1, num_edge1, edge1, head1);
      }
    }
  }
  tarjan();
  for (int i = 1; i <= m << 1; i++) {
    if (sccbelong[i] == sccbelong[i + 1]) {
      printf("Impossible\n");
      exit(0);
    }
    i++;
  }
  for (int i = 1; i <= m << 1; i++) {
    int b1 = sccbelong[i];
    int b2 = sccbelong[i + 1];
    enermy[b1] = b2;
    enermy[b2] = b1;
    i++;
  }
  for (int i = 1; i <= num_scc; i++) {
    vis[i] = false;
    head2[i] = -1;
    indegree[i] = 0;
  }
  num_edge2 = 0;
  for (int i = 1; i <= num_edge1; i++) {
    int x1 = edge1[i].from, x2 = edge1[i].to;
    int b1 = sccbelong[x1], b2 = sccbelong[x2];
    if (b1 != b2) {
      add_Edge(b2, b1, num_edge2, edge2, head2);
      indegree[b1] += 1;
    }
  }
  Topo();
  while (!topq.empty()) {
    int now = topq.front();
    topq.pop();
    if (vis[now]) continue;
    vis[now] = vis[enermy[now]] = true;
    int len = (int)sccown[now].size();
    for (int i = 0; i < len; i++) {
      int x = sccown[now][i];
      int t = (x + 1) >> 1;
      data[t].ans = x;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (data[i].ans == 2 * i)
      printf("i");
    else
      printf("o");
  }
  printf("\n");
}
