#include <iostream>
#include <thread>
#include <atomic>
#include <chrono>
#include <string>
using namespace std;

void timer(atomic<bool>& stop)
{
	unsigned cnt = 0;
	while (this_thread::sleep_for(1s), stop == false)
	{
		cerr << (++cnt) << endl;
	}
	
	cerr << "Timer's stopped" << endl;
}

int main()
{
	atomic<bool> stop{false};
	
	thread t{timer, ref(stop)};
	
	string s;
	
	while (cin >> s, s != "stop")
	{
		cout << "echo " << s << endl;
	}
	
	stop.store(true);
	t.join();
	return 0;
}