#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repf(i, n, flag) for (int i = 0; i < (int)(n) && flag; i++) #define all(v) v.begin(), v.end() bool is_pld(string s) { string t = s; reverse(all(t)); return s == t; } int main() { string a; cin >> a; rep(i, a.size()) { string tmp = a.substr(0, i); reverse(all(tmp)); if(is_pld(a + tmp)) { cout << a + tmp << endl; return 0; } } }