#include <bits/stdc++.h>
using namespace std;
const int maxn = 300000;
bool side[maxn + 1];
int n, m, u, v, route[maxn + 1][4];
bool Check(int i) {
  int k = route[i][0];
  for (int j = 1; j <= route[i][0]; j++)
    if (side[i] ^ side[route[i][j]]) k--;
  if (k > 1) {
    side[i] = !side[i];
    return 1;
  } else {
    return 0;
  }
}
bool Maintain() {
  bool f = 1;
  for (int i = 1; i <= n; i++) {
    int v = i, u = 0;
    while (Check(v)) {
      u++;
      if (u > n) {
        printf("-1\n");
        return 0;
      }
      f = 0;
      v = 0;
      for (int j = 1; j <= route[i][0]; j++)
        if (side[i] == side[route[i][j]]) v = route[i][j];
    }
  }
  if (f) {
    for (int i = 1; i <= n; i++) printf("%d", side[i]);
    printf("\n");
    return 0;
  } else {
    return 1;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u, &v);
    route[u][++route[u][0]] = v;
    route[v][++route[v][0]] = u;
  }
  while (Maintain()) {
  }
  return 0;
}
