![](https://i-blog.csdnimg.cn/blog_migrate/6e6857e6e296dcd9b2187cd7fc16bc58.png)
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int a, b, c, q, w, e;
int d = 0, f = 0; //进位
int res_a, res_b, res_c;
cin >> a >> b >> c >> q >> w >> e;
res_c = c + e;
while (res_c >= 60) {
res_c -= 60;
f += 1;
}
res_b = b + w + f;
while (res_b >= 60) {
res_b -= 60;
d += 1;
}
res_a = a + q + d;
cout << res_a << " " << res_b << " " << res_c << endl;
return 0;
}