Fiery Cavern - Meloetta Puzzle Help

I’m stuck on the Meloetta Puzzle in Fiery Cavern its the one that twist all adjacent tiles if anyone could help it would be much appreciated.