#include using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::string A; std::cin >> A; for (int n = A.size(); ; n++) { std::string S = A; S += std::string(A.rend() - (n - A.size()), A.rend()); auto T = std::string(S.rbegin(), S.rend()); if (S == T) { std::cout << S << "\n"; return 0; } } return 0; }