文件目录

#include <iostream>
using namespace std;
int main()
{
    int h, m, s, k;
    cin >> h >> m >> s >> k;
    int sum = h * 3600 + m * 60 + s + k;
    cout << sum / 3600 << " " << sum % 3600 / 60 << " " << sum % 60;
    return 0;
}