#C3129. Sentence with Highest Word Count

    ID: 46522 Type: Default 1000ms 256MiB

Sentence with Highest Word Count

Sentence with Highest Word Count

Given a text feedback composed of sentences separated by periods (.), your task is to determine the sentence with the highest number of words. Each sentence consists of words separated by spaces. In the case of multiple sentences having the same maximum word count, return the first sentence encountered in the text. If the input is empty or contains no valid sentence, output an empty string.

All input should be read from stdin and the result must be printed to stdout.

inputFormat

A single line of text representing feedback that may contain multiple sentences separated by periods.

outputFormat

Print the sentence with the highest number of words. If no valid sentence exists, print an empty line.## sample

This product is amazing. I loved using it every day. Highly recommend to everyone.
I loved using it every day