import sequtils,strutils,algorithm type unionfindtree[I : static[int]] = array[I,int] proc initUT(I : static[int]):unionfindtree[I] = var res : unionfindtree[I] for i in 0..