#include #include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} void dfs(int x,int p,vector>&g,vector&ans,int k){ for(auto i:g[x]){ if(i==p)continue; if(x>N; vector>g(N); rep(i,N-1){ int a,b; cin>>a>>b; a--; b--; g[a].push_back(b); g[b].push_back(a); } vectorans(N); int k=0; dfs(0,-1,g,ans,k); rep(i,N){ ans[i]+=k; cout<