// compile: g++ -o data data.cpp -std=gnu++20 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#endif
#define sz(v) ((int)(v).size())
#define PV(v) for (int i=0;i<v.size();++i)cout<<v[i]<<" ";cout<<endl;
#define INTINF 9223372036854775807
#define int long long
using namespace std;
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
string s; cin >> s;
vector<int> h(26, 0);
int n = s.length();
for (int i = 0; i < n; ++i) ++h[s[i] - 'A'];
int oddind = -1, odd = 0;
for (int i = 0; i < 26; ++i) {
if (h[i] & 1) {
++odd;
oddind = i;
}
}
if ((!(n & 1) && odd) || (n & 1 && odd > 1)) {
cout << "NO SOLUTION" << endl;
return 0;
}
for (int i = 0; i < 26; ++i) {
if (i == oddind) continue;
for (int j = 0; j < (h[i]>>1); ++j) cout << char(i + 'A');
}
if (~oddind) for (int j = 0; j < h[oddind]; ++j) cout << char(oddind + 'A');
for (int i = 25; i >= 0; --i) {
if (i == oddind) continue;
for (int j = 0; j < (h[i]>>1); ++j) cout << char(i + 'A');
}
cout << endl;
return 0;
}
VNL Casino, a friend told me that this casino is very popular in the local area. I personally haven’t tried it yet, but you can try it now. Find out more: vnlcasino
11betcon – not a bad option to see some promotions and events. Check them here:11betcon!
Medusa! Mythological slots at its finest. This version is really well-done, with smooth animations and exciting bonus features. If you’re into Greek mythology and slots, medusagamevn is worth a look!
Been playing at phdreamonlinecasino for a while now. Pretty good selection of games and the payouts are decent. Give it a shot! Check phdreamonlinecasino!
Need help with the big88login sometimes it’s a bit slow! Anyone else have this issue? Anyway hope all you win soon! Easy access at big88login!
Jiliwin11, huh? Sounds like a potentially fun time. Might have to give it a shot and see what it’s all about! Explore it yourself: jiliwin11
Alright, Playkaro247 is where it’s at for quick gaming fixes. Easy to log in and hop right into the action. Totally worth checking out. playkaro247
78wind, hey, not bad! Gave it a spin and had some decent luck. Nothing crazy, but kept me entertained for a while. I’d say it’s worth checking out if you’re looking for something new. Happy gaming! Click here for 78wind
Alright, alright, arenapluspc. Gave this a shot after seeing it pop up everywhere. Interface is pretty slick and the variety of options is solid. Think I’ll be back, especially if they keep the promos coming! Find out more arenapluspc