To beat the desert, you must go back, left the hut, and be a coconut again and again until you destroy the stone wall containing water. Then you can be appletree in the desert.
the red cube is in the first screen, down, all way to the left. The order that worked for me started with red, putting them in when the tree had that colour.