#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000000;
int n, m;
int col[MAXN], w[MAXN], q[MAXN];
set<int> v;
vector<int> ed[MAXN];
int main() {
  scanf("%d%d", &n, &m);
  for (; m--;) {
    int u, v;
    scanf("%d%d", &u, &v);
    ed[u].push_back(v);
    ed[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) v.insert(i);
  for (int l = 0, r = 0;;) {
    for (; l < r;) {
      int u = q[l++], cnt = 0;
      for (int i = 0; i < ((int)ed[u].size()); i++)
        if (w[ed[u][i]] && col[ed[u][i]] == col[u]) cnt++;
      if (cnt > 1) col[u] ^= 1;
      for (int i = 0; i < ((int)ed[u].size()); i++)
        if (!w[ed[u][i]])
          w[ed[u][i]] = 1, v.erase(v.find(ed[u][i])), q[r++] = ed[u][i],
          col[ed[u][i]] = col[u] ^ 1;
    }
    if (((int)v.size())) q[r++] = *v.begin(), w[q[l]] = 1, v.erase(v.begin());
    if (l == r) break;
  }
  for (int it = 0; it < 10; it++) {
    for (int i = 1; i <= n; i++) {
      int amo = 0;
      for (int j = 0; j < ((int)ed[i].size()); j++)
        if (col[ed[i][j]] == col[i]) amo++;
      if (amo > 1) {
        col[i] ^= 1;
        if (it == 9) {
          puts("-1");
          return 0;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%d", col[i]);
  return 0;
}
