#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int NAX = 3e5 + 5, MOD = 1000000007;
vector<int> adj[NAX];
struct Solution {
  Solution() {}
  void solveCase() {
    int n, m;
    cin >> n >> m;
    string ret(n, '0');
    for (size_t i = 0; i < m; i++) {
      int u, v;
      cin >> u >> v;
      --u, --v;
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    int ctr = 100;
    bool ok = false;
    while (ctr--) {
      ok = true;
      for (size_t i = 0; i < n; i++) {
        int k = 0;
        for (auto &x : adj[i]) k += ret[x] == ret[i];
        if (k > 1) {
          ret[i] = '1' ^ ret[i] ^ '0';
          ok = false;
        }
      }
      if (ok) break;
    }
    if (ctr)
      cout << ret << '\n';
    else
      cout << -1 << '\n';
  }
};
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  Solution mySolver;
  for (int i = 1; i <= t; ++i) {
    mySolver.solveCase();
  }
  return 0;
}
