N = int(input())  
K = N // 3600  
N = N % 3600  
P = N // 60  
N = N % 60  
print(K, 'sagat', P, 'minut', N, 'sekund')