Word in consecutive lines

Write a program that finds the first word appearing in two consecutive lines of a given text.

Input

The program reads a text composed of lines, maybe verses of a poem.

Output

The program outputs "Found: " followed by a word such that there are two consecutive lines that contain that word, no earlier pair of consecutive lines has a common word, and the appearance in the second line is as early as possible; or "Found nothing" in case such a word does not exist.

Problem information

Author: J L Balcázar

Generation: 2026-01-25T14:35:32.297Z

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