Now we are going to permutate the last layer. Familiarize yourself with the following picture as it is the notations used for the following steps.
Use the following pictures to solve your cases.