Function to perform the find operation of disjoint set union
def Find ( parent , a ) : NEW_LINE INDENT if ( parent [ a ] == a ) : NEW_LINE INDENT return a NEW_LINE DEDENT return Find ( parent , parent [ a ] ) NEW_LINE DEDENT