Implement a simple union find set