#include <stdio.h> int main() { unsigned int num = 0; int arr[11] = {0}; scanf("%u",&num); int flag = 0; while (num > 0) { int cnt = num % 10; arr[flag] = cnt; num /= 10; flag++; } for (int i = flag-1; i >= 0; i--) { if (i % 3 ==0 && i != 0) { printf("%d,",arr[i]); } else { printf("%d",arr[i]); } } return 0; }