#include <iostream>
#include <fstream>
#include <string>
using std::cin;
using std::string;
int main(){
setlocale(LC_ALL,"Russian");
string str;
while(cin >> str)//While Ctrl-Z (Ctrl-D *nix)
{
std::ofstream exp("text.txt");
exp << str << std::endl;
}
}