#include <iostream>
#include <cstring>
#include <string.h>
using namespace std;
int main()
{
string a("hello");
cout << a << endl;
string b = a;
cout<< b << endl;
string c = b + a;
cout << c << endl;
string d(5,'a');
cout << d << endl;
string e=strcpy((char*)d.data(),a.data());
cout << e << endl;
cout << d << endl;
cout << strncmp(c.data(),a.data(),10) << endl;
cout << d.empty() << endl;
cout << d.size() << endl;
cout << d.length()-e.length() << endl;
if(e == d){
cout << "e == d" << endl;
}
d.clear();
cout << d << endl;
string f;
getline(cin,f);
int n = 0;
int i = 0;
while(1){
if(f.at(i) == ' '){
n=n+1;
i++;
}else{
i++;
}
if( i>= f.length()){
break;
}
}
cout << n << endl;
return 0;
}
#include <iostream>
using namespace std;
namespace my_space
{
string f;
string ff;
string run(){
getline(cin,f);
for(int i = f.length()-1; i >= 0; i--){
ff+=f.at(i);
}
return ff;
}
}
using namespace my_space;
int main()
{
cout << run() << endl;
return 0;
}