#include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string N; cin >> N; int len = N.size(); int pos = (len - 1) % 3 + 1; for (int i = 1; i <= pos; ++i) cout << N[i - 1]; while (pos < len){ cout << ','; cout << N[pos] << N[pos + 1] << N[pos + 2]; pos += 3; } return 0; }