It is necessary to gradually remove two identical candies, while they should not be blocked. That is, they should have free left or right side, and others do not lie on top. The path from one candy to its pair may not be short, but the main thing is to connect at right angles, no more than two bends.