#include using namespace std; using int64 = long long; int main() { string S; cin >> S; int add = 0; string T; for(int i = S.size() - 1; i >= 0; i--) { ++add; T += S[i]; if(add % 3 == 0 && i) { T += ","; } } reverse(T.begin(), T.end()); cout << T << endl; }