#include <stdio.h>
int main(){
	for(int i=0;i<3;i++){
		int h1,m1,s1,h2,m2,s2;
		int h,m,s,r,l;
		scanf("%d %d %d %d %d %d",&h1,&m1,&s1,&h2,&m2,&s2);
		r = ((h2*60 + m2)*60+s2) - ((h1*60 + m1)*60+s1);
		h = r/3600;
		l = r - h*3600;
		m = l/60;
		s = l - m*60;
		printf("%d %d %d\n",h,m,s);
	}
}
