Please log in to access this page.

First Second Third

Added: 2025-09-13 06:32:46

Question Image

First Second Third

Answer

✏️ Edit
text = input()
first = input()
second = input()

words = text.split()
result = []

for i in range(len(words) - 2):
    if words[i] == first and words[i + 1] == second:
        result.append(words[i + 2])

for word in result:
    print(word)