#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
typedef long long ll;
void solve() {
string s ;
cin >> s ;
map < char , ll > m ;
ll cnt = 0 ;
char c1 ;
for (int i = 0 ; i < 26 ; i++ ) {
ll x = count (s.begin () , s.end () ,'A' + i ) ;
if ( x & 1 == 1 ) {
c1 = 'A' + i ;
cnt ++ ;
m['A' + i ] = x-1 ;
}
else if (x > 0) m['A' + i ] = x ;
}
if (cnt > 1 ) cout <<"NO SOLUTION" << endl ;
else {
string s1 ;
for (auto e : m ) {
s1 += string ( e.second /2 , e.first ) ;
}
cout << s1 ;
if ( cnt == 1 ) cout << c1 ;
std::reverse(s1.begin(), s1.end());
cout << s1<< endl ;
}
}
int main() {
ll t ;
/*cin >> t ;
while (t-- ) {*/
solve();
// }
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgYWxsKHgpIHguYmVnaW4oKSwgeC5lbmQoKQoKdHlwZWRlZiBsb25nIGxvbmcgbGw7CgoKCnZvaWQgc29sdmUoKSB7CiAgIHN0cmluZyBzIDsKICAgIGNpbiA+PiBzIDsKICAgIG1hcCA8IGNoYXIgLCBsbCA+IG0gIDsKICAgIGxsIGNudCA9IDAgOwogICAgY2hhciBjMSA7CiAgICBmb3IgKGludCBpID0gIDAgOyBpIDwgMjYgOyBpKysgKSB7CiAgICAgICAgbGwgeCAgPSBjb3VudCAocy5iZWdpbiAoKSAsICBzLmVuZCAoKSAsJ0EnICsgaSAgKSAgOwogICAgICAgIGlmICggeCAmIDEgPT0gMSApIHsKICAgICAgICAgICAgYzEgPSAnQScgKyBpICA7CiAgICAgICAgICAgIGNudCArKyAgOwogICAgICAgICAgICBtWydBJyArIGkgXSA9IHgtMSA7CgogICAgICAgIH0KICAgICAgICBlbHNlICBpZiAoeCA+IDApIG1bJ0EnICsgaSBdID0geCA7CgogICAgfQoKICAgIGlmIChjbnQgPiAxICkgY291dCA8PCJOTyBTT0xVVElPTiIgPDwgZW5kbCA7CiAgICBlbHNlIHsKICAgICAgICBzdHJpbmcgczEgIDsKICAgICAgICBmb3IgKGF1dG8gZSA6ICBtICkgewogICAgICAgICAgICBzMSArPSBzdHJpbmcgKCBlLnNlY29uZCAvMiAsIGUuZmlyc3QgICkgOwogICAgICAgIH0KICAgICAgICBjb3V0IDw8IHMxICAgOwogICAgICAgIGlmICggY250ID09IDEgKSBjb3V0IDw8IGMxIDsKCiAgICAgICAgc3RkOjpyZXZlcnNlKHMxLmJlZ2luKCksIHMxLmVuZCgpKTsKICAgICAgICBjb3V0IDw8IHMxPDwgZW5kbCAgOwogICAgfQoKCn0KCmludCBtYWluKCkgewogICAgbGwgdCA7CiAgICAvKmNpbiA+PiB0IDsKICAgIHdoaWxlICh0LS0gKSB7Ki8KICAgICAgICBzb2x2ZSgpOwoKCiAgIC8vIH0KCgoKICAgIHJldHVybiAwOwp9Cg==