DZY love planting enjoy solve tree problemsdzy weight tree connect undirected graph cycle contain n node number 1 n he define function gxy 1xyn long edge short path node x y Specially gzz0 zFor integer sequence p1p2pn 1pin DZY define fp DZY want find sequence p fp maximum possible value but restriction element j appear p xj timesplease find maximum possible fp describe restriction