#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; void solve() { string s; cin >> s; rep(i, 0, s.size()) { cout << s[i]; if ((s.size() - (i + 1)) % 3 == 0 && i + 1 != s.size()) cout << ","; } cout << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); getchar(); }