Added UF with path compression.