#include <bits/stdc++.h>
using namespace std;
string s,x;
int sd,br;
int imams[30],imap[30];
bool provera(){
  for(int i=1;i<=)

}
int main(){
  cin>>s;
  sd=s.size();
  br=sd/2;
  for(int i=0,j=sd-1;i<=sd/2-1;i++,j--)if(s[i]!=s[j]){br=i;break;}
  for(int i=br;i<=sd-br-1;i++)x.push_back(s[i]);//<<endl;
  podskup
  

  return 0;
}