First Frequent Over Limit

Write a program that reads a limit integer and a sequence of words and finds the first word in the sequence whose frequency count reaches beyond the limit.

Input

First comes a limit integer @n@; follows a sequence of nonempty words, all formed only by lower-case letters. Words are separated by blank spaces or line ends, or both; at least one such separator, but maybe more than one.

Output

If there are words in the sequence that appear more times than the limit @n@, the first one found to reach above the limit has to be identified with a message like in the examples. Otherwise, also as in the examples, the message "No words reach above frequency @n@" is to be printed.

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T17:14:32.475Z

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