in problem consider complete undirected graph consist n vertex weight edge the weight edge integer 1 kAn undirected graph consider beautiful sum weight edge incident vertex 1 equal weight mst graph mst minimum span tree tree consist n1 edge graph connect n vertex minimum sum weight tree weight MST sum weight edge itcalculate number complete beautiful graph have exactly n vertex weight edge 1 k since answer large print modulo 998244353