Sponsored
Use these hints if you're stuck. Try solving on your own first.
First, you need to consider each layer separately as an array.
Just cycle this array and then re-assign it.
Solve with full IDE support and test cases