sum_second = int(input()) hour = sum_second//60//60 minute = sum_second//60 second = sum_second-3600*hour-60*minute print(hour,minute,second)