#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string S; cin >> S; reverse(S.begin(), S.end()); string res = ""; for (int i = 0; i < (int)S.size(); i++) { if (i != 0 && i % 3 == 0) res += ","; res += S[i]; } reverse(res.begin(), res.end()); cout << res << '\n'; return 0; }