$L_1,...,L_{12}$ has
$12!$ permutations, but, for the problem at hand, we need to think about how
$G_1, G_2, G_3, G_4$ has
$4!$ permutations and each group has
$3!$ permutations within it. So, ultimately, we have
$12! (4!)^{-1} (3!)^{-4} = 15400$ functionally distinct arrangements of any twelve-letter set.