121212 to Hamiltonian