Given the Spectrum(string s,3), use the hamiltonian method and use the euler method to find all strings s with the spectrum.

Spectrum(string s,3) = (ABA, ABC, ACA, BAB, BAC, BCB, CBA)

a.) by the Hamiltonian method

b.) by the Eucler method