fn main() { let stdin = std::io::read_to_string(std::io::stdin()).unwrap(); let mut stdin = stdin.split_ascii_whitespace(); let n: String = stdin.next().unwrap().parse().unwrap(); use std::io::Write; let mut out = std::io::BufWriter::new(std::io::stdout().lock()); out.write_all(output(solve(n)).as_bytes()).unwrap(); } fn solve(n: String) -> String { let mut n = n.into_bytes(); n.reverse(); let mut n = n .chunks(3) .map(|n| n.into_iter().map(|n| *n).collect::>()) .collect::>() .join(&b','); n.reverse(); String::from_utf8(n).unwrap() } fn output(ans: String) -> String { ans + "\n" }