#include<iostream>
#include <stdio.h>
using namespace std;
  
int main(){
	int n;
	for(n=0;n<3;n++){
	int h1,m1,s1,h2,m2,s2;
	cin>>h1>>m1>>s1>>h2>>m2>>s2;
	int h=h2-h1;
	int m=m2-m1;
	int s=s2-s1;
	if(s<0){m--;
	s+=60;}
	if(m<0){h--;
	m+=60;}
	cout<<h<<" "<<m<<" "<<s<<endl;
	}
	return 0;}
