#include #define rep(i,n)for(long long i=0;i<(n);i++) using namespace std; typedef unsigned long long ull; typedef long long ll; const ll INF=1e18; const int MOD=1e9+7; const double pi=acos(-1); int main(){ string s; cin >> s; reverse(s.begin(),s.end()); int n=s.size()/3; if(s.size()%3==0)n--; int now=0; rep(i,n){ s=s.substr(0,3*(i+1)+now)+","+s.substr(3*(i+1)+now); now++; } reverse(s.begin(),s.end()); cout << s << endl; }