#include using lint=long long; using real=long double; lint mod=1'000'000'007; lint normalize(lint x){return x<0?x+mod:x;} int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n;std::cin>>n; std::vector>g(n); for(lint i=0;i>u>>v;u--,v--; g.at(u).push_back(v); g.at(v).push_back(u); } std::vectordepth(n,-1); std::vectorque={0}; depth.at(0)=0; for(lint i=0;i<(lint)que.size();i++){ lint x=que.at(i); for(lint y:g.at(x)){ if(depth.at(y)!=-1)continue; depth.at(y)=depth.at(x)+1; que.push_back(y); } } lint ans=std::accumulate(depth.begin(),depth.end(),0ll, [inverse=[n]{ std::vectorinverse(n+1,1); for(lint i=2;i<=n;i++){ inverse.at(i)=normalize(-inverse.at(mod%i)*(mod/i)%mod); } return inverse; }()](lint acc,lint x){return acc+inverse.at(x+1);})%mod; if(ans<0)ans+=mod; for(lint i=1;i<=n;i++)ans=ans*i%mod; std::cout<