import sys

a  = int(input())
s = a % 60
a = a //60

f = a %60
h = a // 60

print(h,f,s)