Solution (source code)

= Solution

Let $E_5$ denote the <set> of arrangements with $E$ fifth, and $F_6$ those with $F$ sixth. Each contains $5!$ arrangements, while their <intersection> contains $4!$. The <inclusion-exclusion principle> gives
$$
\boxed{|E_5\cup F_6|=5!+5!-4!=216}.
$$