second=int(input()) h = second // 3600 m = (second % 3600) // 60 s = (second % 3600) % 60 print(h,m,s)