#include using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) int main(){ int T; cin >> T; rep(i, T){ string H, g, h; int N; cin >> H >> g >> N >> h; cout << H << " " << g << " " << N + 1 << " " << h << endl; } return 0; }