#include<iostream>
using namespace std;

int main(){
int sh,sm,ss,eh,em,es,totaltime,th,tm,ts;

for(int i=0;i<3;i++){
 cin>>sh>>sm>>ss>>eh>>em>>es;
 totaltime=(eh*3600+em*60+es)-(sh*3600+sm*60+ss);
 ts=totaltime%60;
 totaltime-=ts;
 totaltime/=60;
 tm=totaltime%60;
 totaltime-=tm;
 th=totaltime/60;
 cout<<th<<" "<<tm<<" "<<ts<<"\n";
}

return 0;
}