#include <iostream>
#include <map>

int main()
{
	std::map<int,int> wordcount;
	int read_value;
	while (std::cin >> read_value)
	  	++wordcount[read_value];
	for (auto it = wordcount.begin(); it != wordcount.end(); ++it)
	 	if (it->second > 1)
	    	std::cout << it->first << std::endl;
	return 0;
}