uva; solve "Heavy Cycle Edges" from Volume 117