func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 100 + 20;   vector<pair<int, int> > edge, adj[2 * MAX_N];   vector<int> topol;   int mark[2 * MAX_N], node[2 * MAX_N];   int comp;   int ans[2 * MAX_N];   string s;   int n, m;   void readInput() {     cin >> n >> m;     for (int i(0); i < int(m); i++) {       int v, u;       cin >> v >> u;       --v, u--;       edge.push_back(make_pair(v, u));     }   }   int possib(int v, int u, int x) { return (min(v, u) < x & max(v, u) > x); }   inline int f(int x) { return x > 0 ? (x << 1) : ((-x) << 1) + 1; }   void addEdge(int x, int y) {     adj[f(-x)].push_back(make_pair(f(y), 1));     adj[f(y)].push_back(make_pair(f(-x), 0));     adj[f(-y)].push_back(make_pair(f(x), 1));     adj[f(x)].push_back(make_pair(f(-y), 0));   }   void makeGraph() {     for (int i(0); i < int(edge.size()); i++) {       int v = edge[i].first, u = edge[i].second;       for (int j(0); j < int(edge.size()); j++)         if (i != j && min(v, u) < min(edge[j].first, edge[j].second)) {           int x = edge[j].first, y = edge[j].second;           if (min(v, u) == min(x, y) || max(v, u) == max(x, y)) continue;           if (possib(v, u, min(x, y)) && !possib(v, u, max(x, y))) {             addEdge(i + 1, j + 1);             addEdge(-(i + 1), -(j + 1));           }         }     }   }   void tSort(int v) {     if (node[v]) return;     node[v] = 1;     for (int i(0); i < int(adj[v].size()); i++)       if (adj[v][i].second) tSort(adj[v][i].first);     topol.push_back(v);   }   void dfs(int v, int c) {     mark[v] = c;     for (int i(0); i < int(adj[v].size()); i++) {       int u = adj[v][i].first, type = adj[v][i].second;       if (type || mark[u]) continue;       dfs(u, c);     }   }   void judge(int v, int u) {     if (ans[v] == -1 && ans[u] == -1) {       ans[v] = 1;       ans[u] = 0;       if (u > v) swap(ans[v], ans[u]);     } else if (ans[v] != -1)       ans[u] = ans[v] ^ 1;     else       ans[v] = ans[u] ^ 1;   }   int solve() {     for (int i(1); i < int(m + 1); i++) {       tSort(f(i));       tSort(f(-i));     }     reverse(topol.begin(), topol.end());     for (int i(0); i < int(topol.size()); i++) {       int v = topol[i];       if (!mark[v]) dfs(v, ++comp);     }     for (int i(1); i < int(m + 1); i++)       if (mark[f(i)] == mark[f(-i)]) return 0;     for (int i(1); i < int(comp + 1); i++) ans[i] = -1;     for (int i(1); i < int(m + 1); i++) judge(mark[f(i)], mark[f(-i)]);     for (int i(1); i < int(m + 1); i++) s += (ans[mark[f(i)]] == 1 ?  i  :  o );     return 1;   }   int main() {     ios::sync_with_stdio(false);     readInput();     makeGraph();     cout << (solve() == 1 ? s :  Impossible ) << endl;     return 0;   }   