#include #include #include using namespace atcoder; using mint = modint1000000007; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 int main(){ int n,m; cin>>n>>m; dsu D(n); vector> v(n); rep(i,n)v[i].push_back(i); rep(i,m){ int a,b; cin>>a>>b; a--;b--; if(D.same(a,b))continue; int x = D.leader(a),y = D.leader(b); if(D.size(x)>D.size(y))swap(x,y); if(D.size(x)==D.size(y)){ D.merge(x,y); int z = D.leader(x); while(v[x^y^z].size()!=0){ v[z].push_back(v[x^y^z].back()); v[x^y^z].pop_back(); } } else{ v[x].clear(); D.merge(x,y); } } vector ans(n,0); rep(i,n){ rep(j,v[i].size()){ ans[v[i][j]] = 1; ans[v[i][j]] /= v[i].size(); } } rep(i,n)cout<