you give tree consist n node you label n1 edge integer way satisfie follow condition integer great 0 product n1 number equal k number 1s n1 integer minimum possible Lets define fuv sum number simple path node u node v also let sumlimits_i1n1 sumlimits_ji1n fij distribution index treefind maximum possible distribution index since answer large print modulo 109 7In problem number k large result prime factorization k give instead