#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x E[2050]; ll val[2050][2050]; ll mo=1000000007; int num[2050]; void dfs(int cur,int pre) { int i,j,x; vector nn[2]; nn[0]=vector(2020,0); nn[1]=vector(2020,0); FOR(i,E[cur].size()) if(E[cur][i]==pre) break; if(i>N>>K; FOR(i,N-1) { cin>>x>>y; E[x].push_back(y); E[y].push_back(x); } dfs(0,-1); cout<