Solved problem 'hamm' on Rosalind