Problem 4. Sashka had 3 baskets of apples. The baskets contained 12, 14, and 22 apples. Sashka is allowed to choose two of the three baskets and transfer apples from one to the other. In doing so, she must transfer as many apples as there are in the basket to which she is adding (transferring) the apples. Sashka made three such transfers, and in the end, all the baskets had the same number of apples. How did Sashka do this?
Solution. First, Sashka chose the baskets with 22 and 14 apples. From the basket with 22 apples, she moved 14 apples to the basket with 14 apples. After the first transfer, the baskets contained 8, 28, and 12 apples.

The second time, she chose the baskets with 28 and 12 apples. From the basket with 28 apples, she moved 12 apples to the basket with 12 apples. After the second transfer, the baskets contained 16, 24, and 8 apples.

The third time, she chose the baskets with 24 and 8 apples. From the basket with 24 apples, she moved 8 apples to the other basket. After the third transfer, the baskets contained 16, 16, and 16 apples, i.e., the same number of apples.