#include<iostream>
#include<string>
#include<conio.h>

using namespace std;

int main()
{
	setlocale(LC_ALL, "Russian");

	string previous = "The cat cat jumped ";
	string current;
	while (cin >> current) {
		if (previous == current) {
			cout << "повторяющееся слово: " << current << "\n";
			previous = current;
		}
	}

	_getch();
	return 0;
}