while True: frase = input().lower() if frase == '*': break eh_tautograma = frase.count(' ') == frase.count(' ' + frase[0]) saida = 'Y' if eh_tautograma else 'N' print(saida)