Consider a chain: . Each node has one child except the leaf. Node has set size . Node merges with , giving size . Node merges with , giving size . You keep copying larger and larger sets.
Total operations: . For , this is billion operations. Your solution times out. The pattern happens whenever you always merge into the smaller set.