【AtCoder版!蟻本】ATC001 B - Union Find【Union-Find】

AtCoder版!蟻本でUnion-Find木の類題としてあげられているATC001のB - Union FindをPythonで解いていきます。