#include #include #include using namespace std; int main(void){ // Your code here! string N; cin >> N; sort(N.rbegin(),N.rend()); string S = ""; for(int i = 0; i < N.size(); i++){ S.push_back(N[i]); if(i%3 == 2 and i != N.size() - 1){ S.push_back(','); } } for(auto itr = S.rbegin(); itr != S.rend(); itr++){ cout << *itr; } cout << endl; }