#include <fstream>

using namespace std;

int main(int, char**)
{
	ifstream input;
	input.open("input.txt");
	if ( !input ) return 1;

	ofstream output;
	output.open("output.txt");
	if ( !output ) return 2;

	double number;
#if 1 // the cool way
	while ( input >> number )
	{
		output << number << '\n';
	}
#else // not a bad solution either
	for (;;)
	{
		input >> number;
		if ( ! input.good() ) break;
		output << number << '\n';
	}
#endif

	// be a well-behaved citizen: close your files
	// actually this would be done upon program exit automatically
	input.close();
	output.close();

	return 0;
}

