While looking for rep(x) by traversing parent pointers, set each one to the resulting rep(x).
Click on mouse to advance to next frame.
Note: Since rank is an upper bound on tree height, path compression need not change ranks.