#include #include #include using namespace std; int main(){ string n; cin >> n; reverse(n.begin(), n.end()); string ans = ""; for(int i = 0; i < n.length(); i++){ ans += n[i]; if(i%3 == 2 && i+1 < n.length()) ans += ','; } reverse(ans.begin(), ans.end()); cout << ans << endl; return 0; }