sec = int(input())
hour = sec // 3600
minute = (sec % 3600) // 60
second = ((sec % 3600) % 60) % 60
print(hour,minute,second)