#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int main()
{
fstream file;
file.open("primer.txt");
string niz;
cin>>niz;
file<<niz;
file.close();
system("PAUSE");
return 0;
}

#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int main()
{
fstream file,file2;
file.open("primer.txt");
file2.open("primer2.txt");
string niz;
file>>niz;
int n=niz.size();
for(int i=n-1; i>=0; i--)
file2<<niz[i];
file.close();
file2.close();
system("PAUSE");
return 0;
}