Arrange the Marks!
From the Super Mario Wiki, the Mario encyclopedia
Arrange the Marks! is a minigame found in Mario & Sonic at the Olympic Winter Games. To access it, the players must have Shadow the Hedgehog in their team. In Sparkleton, there is an area that can only be accessible using Cubyrinth's gondola. Here, there are four moving panels with character emblems on them. By using the Chaos Spear to stop the panels, the gate near will open. Unfortunately, Mario and Sonic don't know which emblems to hit and in which order. A Shy Guy near says that he wrote the solution behind a sign in Sparkleton. Mario and Sonic must go look for it. Once done, they have to return to the panels and start this minigame.
To win the minigame, the player needs to slide the stylus to make Shadow hit the correct panel at the right timing, and make it stop. If it's the wrong one, the player must simply touch it again to make it move again. Once all correct panels are hit in the correct order, the minigame is won and the gate will open.
Use Chaos Spear to stop panels and order the marks. Stopped panels move when touched.