N = gets.chomp ans = "" N.length.times do |i| ans << "," if i > 0 && i% 3 == 0 ans << N[-i-1] end puts ans.reverse