s=int(input()) a=s//10%10 b=s//1000%10 c=s//100%10 d=s%10 print(d,b,c,a)
------Input------ 6234 ------Answer----- 4623 ------Your output----- 4 6 2 3