#include<stdio.h> #include<stdlib.h> typedef struct num { int a ; int b ; int c ; int k; }time; int main() { time time1 ={0,0,0,0}; int n,x; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%d",&x); time1.k+=x; time1.a= time1.k/3600; time1.b=(time1.k/60)%60; time1.c=time1.k-time1.a*3600-time1.b*60; printf("%d %d %d\n",time1.a,time1.b,time1.c); } return 0; }