#include<iostream>
using namespace std;
int main(){
  int h1,m1,s1,h2,m2,s2,x,y,z,x1,y1,z1;


  for(int i=0;i<3;i++){
    
    cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;

    x=h1*3600+m1*60+s1;
    y=h2*3600+m2*60+s2;
    z=y-x;
    x1=z/3600;
    z-=x1*3600;
    y1=z/60;
    z-=y1*60;
    cout << x1 <<" "<< y1<<" "<< z <<endl;

  }
  


  return 0;
}