#include <bits/stdc++.h>
using namespace std;
vector<int> v[100];
int cur_color[100];
bool permit_color[100][4];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
//freopen("revegetate.in","r",stdin);
//freopen("revegetate.out","w",stdout);
int n, m;
cin>>n>>m;
while(m--)
{
int f, t;
cin>>f>>t;
--f, --t;
v[f].push_back(t);
v[t].push_back(f);
}
for(int par = 0; par < n; par++)
{
for(auto child : v[par]){
int ch_c = cur_color[child];
if(ch_c == cur_color[par]){
permit_color[child][ch_c] = true;
for(int i = 0; i < 4; i++)
if(!permit_color[child][i])
{
cur_color[child] = i;
break;
}
}
}
}
for(int x = 0; x < n; x++) cout<<cur_color[x] + 1;
cout<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2ZWN0b3I8aW50PiB2WzEwMF07CmludCBjdXJfY29sb3JbMTAwXTsKYm9vbCBwZXJtaXRfY29sb3JbMTAwXVs0XTsKCmludCBtYWluKCkKewoJaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CgljaW4udGllKDApOwoKCS8vZnJlb3BlbigicmV2ZWdldGF0ZS5pbiIsInIiLHN0ZGluKTsKCS8vZnJlb3BlbigicmV2ZWdldGF0ZS5vdXQiLCJ3IixzdGRvdXQpOwoKICAgIGludCBuLCBtOwogICAgY2luPj5uPj5tOwogICAgd2hpbGUobS0tKQogICAgewoKICAgIAlpbnQgZiwgdDsKICAgIAljaW4+PmY+PnQ7CiAgICAJLS1mLCAtLXQ7CiAgICAJdltmXS5wdXNoX2JhY2sodCk7CiAgICAJdlt0XS5wdXNoX2JhY2soZik7CiAgICB9CiAgICBmb3IoaW50IHBhciA9IDA7IHBhciA8IG47IHBhcisrKQogICAgewogICAgCWZvcihhdXRvIGNoaWxkIDogdltwYXJdKXsKCiAgICAJCWludCBjaF9jID0gY3VyX2NvbG9yW2NoaWxkXTsKCiAgICAJCWlmKGNoX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