#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000000;
const long long infLL = 9000000000000000000;
template <typename first, typename second>
ostream& operator<<(ostream& os, const pair<first, second>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "{";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ",";
    os << *it;
  }
  return os << "]";
}
template <typename T>
ostream& operator<<(ostream& os, const multiset<T>& v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename first, typename second>
ostream& operator<<(ostream& os, const map<first, second>& v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
void faltu() { cerr << '\n'; }
template <typename T>
void faltu(T a[], int n) {
  for (int i = 0; i < n; ++i) cerr << a[i] << ' ';
  cerr << '\n';
}
template <typename T, typename... hello>
void faltu(T arg, const hello&... rest) {
  cerr << arg << ' ';
  faltu(rest...);
}
int n, m;
vector<int> adjlist[105];
int a[105], b[105];
int lvl[105];
void bfs() {
  memset(lvl, -1, sizeof(lvl));
  queue<int> q;
  for (int i = 1; i <= m; ++i) {
    if (lvl[i] == -1) {
      lvl[i] = 0;
      q.push(i);
      while (!q.empty()) {
        int u = q.front();
        q.pop();
        for (auto v : adjlist[u]) {
          if (lvl[v] == -1) {
            lvl[v] = lvl[u] ^ 1;
            q.push(v);
          } else if (lvl[v] != lvl[u] ^ 1) {
            cout << "Impossible" << '\n';
            exit(0);
          }
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  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 = i + 1; j <= m; ++j) {
      if (a[i] >= b[j] || b[i] <= a[j]) continue;
      if (a[i] >= a[j] && b[i] <= b[j]) continue;
      if (a[j] >= a[i] && b[j] <= b[i]) continue;
      adjlist[i].push_back(j);
      adjlist[j].push_back(i);
    }
  }
  bfs();
  for (int i = 1; i <= m; ++i) {
    if (lvl[i] == 0)
      cout << 'o';
    else
      cout << 'i';
  }
  cout << '\n';
}
