// import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { StringBuilder sb = new StringBuilder(sc.next()); int length = sb.length(); for (int i=length; i>=0; i--) { if (length-i!=0 && i!=0) { if ((length-i)%3==0) sb.insert(i,","); } } System.out.println(sb); } }