#include <bits/stdc++.h>
using namespace std;
template <typename T>
string tostr(T a) {
  stringstream ss;
  ss << a;
  return ss.str();
}
vector<vector<int> > land;
vector<bool> was, col;
bool ok;
int res = 0;
void dfs(int v) {
  was[v] = 1;
  int num = 0;
  for (int i = 0; i < (land[v].size()); i++) {
    int to = land[v][i];
    num += col[v] == col[to];
  }
  if (num > 1) {
    col[v] = !col[v];
    res++;
    ok = 0;
  }
  for (int i = 0; i < (land[v].size()); i++) {
    int to = land[v][i];
    if (!was[to]) dfs(to);
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  land.resize(n), was.resize(n), col.resize(n);
  for (int i = 0; i < (m); i++) {
    int x, y;
    cin >> x >> y;
    land[--x].push_back(--y);
    land[y].push_back(x);
  }
  ok = 0;
  while (!ok) {
    ok = 1;
    fill(was.begin(), was.end(), 0);
    for (int i = 0; i < (n); i++)
      if (!was[i]) {
        dfs(i);
        if (res > m) {
          cout << -1 << endl;
          return 0;
        }
      }
  }
  for (int i = 0; i < (n); i++) cout << col[i];
  cout << endl;
  return 0;
}
