#include using namespace std; using ll = long long; using ull = unsigned long long; const long long MOD = 1000000007; const long double PI = 3.14159265358979; const long long INF = 1LL<<60; template bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;} template bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;} bool is_prime(long long N){if(N==1) return false;for(long long i=2; i*i <= N; i++){if(N%i==0)return false;}return true;} long long gcd(long long a, long long b){if (b == 0) return a;else return gcd(b, a % b);} template using min_priority_queue = priority_queue, greater>; #define int long long vector> G; vector> nodes; vector vis, siz; int d; int dfs(int now, int par){ if(vis[now]){ return 0; } int res = 0; for(auto v: G[now]){ if(v==par) continue; res += 1+dfs(v,now); } siz[d]++; vis[now] = 1; return res; } int32_t main(){ int N; cin >> N; G.resize(N); vis.resize(N,0); siz.resize(N,0); for(int i=0; i> a >> b; a--; b--; nodes.push_back({a,b}); G[a].push_back(b); G[b].push_back(a); } bool flag = true; for(int i=0; i nurinuri(N,0); for(int i=0; i