#encoding:utf-8 No.0532 2014.11.13
3.times do
  time = gets.chomp.split.map{|item| item.to_i}
  start = time[0]*3600 + time[1]*60 + time[2]
  finish = time[3]*3600 + time[4]*60 + time[5]

  h = (finish-start)/3600
  m = ((finish-start)%3600)/60
  s = (finish-start)%60

  printf("%d %d %d\n",h,m,s)
end