#include <bits/stdc++.h>
using namespace std;
template <class T>
void fmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void fmin(T &a, T b) {
  if (a > b) a = b;
}
const int N = 1e5 * 3 + 10;
int a[N][3], c[N], n, m, w[N];
queue<int> Q;
int main() {
  cin >> n >> m;
  for (int i = (int)1; i <= (int)n; i++) w[i] = -1;
  for (int i = 0; i < (int)m; i++) {
    int x, y;
    cin >> x >> y;
    a[x][c[x]++] = y;
    a[y][c[y]++] = x;
  }
  for (int z = (int)1; z <= (int)n; z++)
    if (-1 == w[z]) {
      Q.push(z);
      int cnt = 0;
      while (!Q.empty()) {
        cnt++;
        if (cnt > n * 20) {
          cout << -1 << endl;
          return 0;
        }
        int i = Q.front();
        Q.pop();
        int t[2] = {0, 0};
        for (int j = 0; j < (int)c[i]; j++)
          if (-1 != w[a[i][j]]) t[w[a[i][j]]]++;
        if (w[i] == (t[0] > t[1])) continue;
        w[i] = (t[0] > t[1]);
        for (int j = 0; j < (int)c[i]; j++) Q.push(a[i][j]);
      }
    }
  for (int i = (int)1; i <= (int)n; i++) cout << w[i];
  cout << endl;
}
