Given the letters A,B,C,D,E, and F, determine the number of different ways the six letters can be arranged when the letter A is neither at the beginning nor at the end.

Leftmost position: 5 ways

Next, rightmost position: 4 ways

Next, 2nd position from the left: 4 ways

Next, 3rd position from the left: 3 ways

Next, 4th position from the left: 2 ways

Next, 5th position from the left: 1 way

How do you get that? What letter do the position refer to?