#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ int n; cin>>n; vector> E(n);//E.resize(n); rep(i,n-1){ int a,b; cin>>a>>b; a--,b--; E[a].push_back(b); E[b].push_back(a); } rep(i,n){ int ans = 0; rep(j,E[i].size()){ int to= E[i][j]; ans += E[to].size()-1; } cout<