You have a row of coins and you can perform these three operations as many times as you like:
Remove three adjacent heads
Remove two adjacent tails
If there’s a head between two tails, then you can remove the head and swap the two tails to heads.
You apply these operations until you can’t make any more moves. Show that you will always get the same configuration at the end, no matter the order.