#include using namespace std; using ll = long long; using PII = std::pair; using PLL = std::pair; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { #ifdef DEBUG cout << "DEBUG MODE" << endl; ifstream in("input.txt"); //for debug cin.rdbuf(in.rdbuf()); //for debug #endif int n, m, a, b, d; cin >> n >> m; vector connect[n], search, new_search; string ans; int depth[n]; fill(depth, depth + n, 0); rep(i, m) { cin >> a >> b; connect[a].push_back(b); connect[b].push_back(a); } for (int k = n - 1; k >= 0; k--) { if (depth[k] == 0) { search.push_back(k); d = 1; while (!search.empty()) { for (auto i : search) depth[i] = d; for (auto i : search) { for (auto j : connect[i]) { if (depth[j] == 0) new_search.push_back(j); } } search.clear(); search = new_search; new_search.clear(); d++; } } } #ifdef DEBUG for (auto z : depth) cout << z << " "; cout << endl; #endif depth[0] = 0; d = 0; rep(i, n) { if (depth[i] % 2 == 1) { ans += '0'; } else { ans += '1'; d = i; } } ans = ans.substr(0, d + 1); reverse(ans.begin(), ans.end()); cout << ans << endl; return 0; }