import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String str = scanner.next(); StringBuilder stringBuilder = new StringBuilder(str); for(int index = str.length() - 3; index > 0; index -= 3){ stringBuilder.insert(index, ','); } System.out.print(stringBuilder.toString()); } }