#include
#include
using namespace std;
int main() {
string s;
cin>>s;
reverse(s.begin(),s.end());
cout<<s<<endl;
}
#include
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
//s1所有字串组合在s2中遍历寻找
int size = s1.size();
int maxlen = 0;
for (int i = 0; i < s1.size(); i++)
{
for (int j = i+1; j <= size; j++)
{
string tmp(s1.begin() + i, s1.begin() + j);
if (s2.find(tmp) != string::npos)
{
if (tmp.size() > maxlen)
maxlen = tmp.size();
}
}
}
cout << maxlen << endl;
}
string迭代器左闭右开!