# 直接使用除法和取余运算 s = int(input()) hours = s // 3600 minutes = (s % 3600) // 60 seconds = s % 60 print(hours, minutes, seconds)