#include <bits/stdc++.h>
using namespace std;
const long long maxn = 3e5 + 10;
long long a[maxn], n, m, mark[maxn];
vector<long long> v[maxn];
bool Mark[maxn];
void dfs(long long x, long long t) {
  if (Mark[x] == true) return;
  long long child = -1, cnt = 0;
  for (long long i = 0; i < v[x].size(); i++)
    if (mark[v[x][i]] == t) child = v[x][i], cnt++;
  if (child == -1) return;
  if (cnt > 1) {
    mark[x] = t + 1;
    if (mark[x] > 2) mark[x] -= 2;
    dfs(x, mark[x]);
    return;
  }
  Mark[x] = true;
  if (cnt == 1) {
    dfs(child, mark[child]);
    Mark[x] = false;
    return;
  }
  Mark[x] = false;
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    long long fi, se;
    cin >> fi >> se;
    v[fi].push_back(se);
    v[se].push_back(fi);
  }
  for (long long i = 1; i <= n; i++) {
    mark[i] = 1;
    dfs(i, 1);
  }
  for (long long i = 1; i <= n; i++) cout << mark[i] - 1;
}
