poj 2492. Union-find-set.
poj 2492. Union-find-set.
merge from master