#include "bits/stdc++.h" using namespace std; using ll = long long; void Main() { string hitsuji, ga, hiki; int N; cin >> hitsuji >> ga >> N >> hiki; cout << hitsuji << " " << ga << " " << N + 1 << " " << hiki << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); std::cout << std::fixed << std::setprecision(15); int T; cin >> T; while (T--) { Main(); } return 0; }