Dunk the ball in black, add the hat, then dunk in yellow. Remove the hat, rotate, replace the hat, and repeat the yellow dip and rotation sequence until the pattern matches.