Let $n$ be a positive integer. A function $f : \{1, 2, \dots, 2n\} \to \{1, 2, 3, 4, 5\}$ is good if $f(j+2)$ and $f(j)$ have the same parity for every $j = 1, 2, \dots, 2n-2$. Prove that the number of good functions is a perfect square.
Problem
Source: Rio de Janeiro Mathematical Olympiad 2018, Level 3, #3
Tags: function, Perfect Square, combinatorics