What I have so far is largely based off page 571 of \"Introduction To Algorithms\" by Cormen et al.
I have a Node class in python that represents a set:
Presuming that each node is initialised to be its own parent:
def Find(node): while node is not node.parent: node = node.parent return node