Codeeval exercise beautiful strings