A0001. Cool lines

A line of words is cool if its first word, word in the middle and last
word are identical.

Your task is to write a program that reads various lines, and prints if
all the lines are cool, if there is not any cool line, or if there are
some lines that are cool and some that are not.

Input

The input is a sequence of one or more lines. Each line starts with a
natural number that indicates its number of words. If this number is
even, the middle word does not exist, therefore the line cannot be cool.
After the natural number, each line has, at least, two words.

Output

The program has to print “|all cool|”, “|none cool|” or “|both types|”
depending on the case.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:20:44.617Z

© Jutge.org, 2006–2026.
https://jutge.org
