ChangeLetter at position nUnchanged part
First half reversed (M L K ... A, then N ... Z)14 − n, for n = 1 to 13positions 14-26
Second half reversed (A ... M, then Z Y ... N)40 − n, for n = 14 to 26positions 1-13
Both halves reversed14 − n in the first half, 40 − n in the secondnone

Reversed first half: 14 − n. Reversed second half: 40 − n. Any line of N letters: nth from the right = (N + 1 − n)th from the left.

Key takeaways: a reversed first half puts letter 14 − n at position n; a reversed second half puts 40 − n there; move in positions first and convert to a letter last; for any shortened line of N letters, use N + 1 in place of 27; V, Q, L, G, B are the anchors counted from Z.