n=int(input())
min=n//60
h=min//60
mins=min%60
seconds=n%60
print(h,mins,seconds)