#include <bits/stdc++.h>
using namespace std;
const int maxn = 300005;
int m, n, xc, yc, rc, fc, cs, t1;
vector<int> f[maxn];
int biao[maxn], u[maxn];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &xc, &yc);
    f[xc].push_back(yc);
    f[yc].push_back(xc);
  }
  memset(biao, 0, sizeof(biao));
  for (int i = 1; i <= n; i++)
    if (biao[i] == 0) {
      rc = 1;
      fc = 1;
      u[rc] = i;
      biao[i] = 1;
      while (rc <= fc) {
        for (int j = 0; j < f[u[rc]].size(); j++) {
          cs = f[u[rc]][j];
          if (biao[cs] == 0) {
            biao[cs] = 3 - biao[u[rc]];
            ++fc;
            u[fc] = cs;
          }
        }
        ++rc;
      }
    }
  for (int tt = 1; tt <= 10; tt++) {
    for (int i = 1; i <= n; i++)
      if (f[i].size() == 3) {
        t1 = 0;
        if (biao[i] == biao[f[i][0]]) ++t1;
        if (biao[i] == biao[f[i][1]]) ++t1;
        if (biao[i] == biao[f[i][2]]) ++t1;
        if (t1 > 1) biao[i] = 3 - biao[i];
      }
  }
  for (int i = 1; i <= n; i++) printf("%d", biao[i] - 1);
  cout << endl;
  return 0;
}
