#include <iostream>     
#include <fstream>     
#include <string>     
 int main() { 
  string nome;
  ofstream outfile("out.dat",ios::out);
  if(!outfile) cerr << "Errore nell'aprire il file" << endl;
 while (cin >> nome) outfile << nome << endl;
 outfile.close(); 
 }
