#include #include #include int main() { std::ifstream fin("input.txt"); std::ofstream fout("output.txt"); std::string word; while (fin >> word) { for (int i = 0; i < word.length() - 1; i++) { if (word[i] == word[i + 1]) { fout << word << std::endl; break; } } } fin.close(); fout.close(); return 0; }