ACM problem 'c': MorseCode