#include <iostream>

using namespace std;

int main(){
  int h,m,s,hh,mm,ss;
  for(int i=0;i<3;i++){
    cin >> h >> m >> s >> hh >> mm >> ss;    
    h = (hh - h);
    m = (mm - m);
    s = (ss - s);
    if (s<0){
      s += 60;
      m--;
    }
    if (m<0){
      m += 60;
      h--;
    }
    cout << h << " " << m << " " << s << endl;
  }
  return 0;
}