#ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include using namespace std; #if __has_include() #include using namespace atcoder; #endif #pragma region Macros // rep macro #define rep(i, n) for(long long i = 0; i < n; ++i) #define rep2(i, a, b) for(long long i = a; i <= b; ++i) #define rep3(i, l, r, c) for(long long i = (l); i < (r); i += (c)) #define rrep(i, a, b) for(long long i = a; i >= b; --i) // name macro #define pb push_back #define eb emplace_back #define SZ(a) ((int)(a).size()) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define popcnt(x) __builtin_popcountll(x) template using V = std::vector; template using VV = std::vector>; template using pq = std::priority_queue; template using pqg = std::priority_queue, std::greater>; using pii = std::pair; using pll = std::pair; using ll = long long; using ld = long double; using int128 = __int128_t; using pii = std::pair; using pdd = std::pair; using pll = pair; using pld = pair; #define fi first #define se second #define mt make_tuple #define SUM(v) accumulate(all(v), 0ll) #define MAX(v) *max_element(all(v)) #define MIN(v) *min_element(all(v)) #define UNIQUE(v) sort(all(v)), v.erase(unique(all(v)), v.end()) #define vi vector #define vd vector #define vll vector #define vld vector #define vpii vector #define vpdd vector #define vpll vector #define vpld vector #define vc vector #define vvc vector #define vs vector // input macro template std::istream &operator>>(std::istream &is, std::pair &p) { is >> p.first >> p.second; return is; } template std::istream &operator>>(std::istream &is, std::vector &v) { for(T &i : v) is >> i; return is; } std::istream &operator>>(std::istream &is, __int128_t &a) { std::string s; is >> s; __int128_t ret = 0; for(int i = 0; i < s.length(); i++) if('0' <= s[i] and s[i] <= '9') ret = 10 * ret + s[i] - '0'; a = ret * (s[0] == '-' ? -1 : 1); return is; } #if __has_include() std::istream &operator>>(std::istream &is, atcoder::modint998244353 &a) { long long v; is >> v; a = v; return is; } std::istream &operator>>(std::istream &is, atcoder::modint1000000007 &a) { long long v; is >> v; a = v; return is; } template std::istream &operator>>(std::istream &is, atcoder::static_modint &a) { long long v; is >> v; a = v; return is; } template std::istream &operator>>(std::istream &is, atcoder::dynamic_modint &a) { long long v; is >> v; a = v; return is; } #endif namespace scanner { void scan(int &a) { std::cin >> a; } void scan(long long &a) { std::cin >> a; } void scan(std::string &a) { std::cin >> a; } void scan(char &a) { std::cin >> a; } void scan(char a[]) { std::scanf("%s", a); } void scan(double &a) { std::cin >> a; } void scan(long double &a) { std::cin >> a; } template void scan(std::pair &p) { std::cin >> p; } template void scan(std::vector &a) { std::cin >> a; } void INPUT() {} template void INPUT(Head &head, Tail &... tail) { scan(head); INPUT(tail...); } } // namespace scanner #define VEC(type, name, size) \ std::vector name(size); \ scanner::INPUT(name) #define VVEC(type, name, h, w) \ std::vector> name(h, std::vector(w)); \ scanner::INPUT(name) #define INT(...) \ int __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) #define LL(...) \ long long __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) #define STR(...) \ std::string __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) #define CHAR(...) \ char __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) #define DOUBLE(...) \ double __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) #define LD(...) \ long double __VA_ARGS__; \ scanner::INPUT(__VA_ARGS__) // output-macro template std::ostream &operator<<(std::ostream &os, const std::pair &p) { os << p.first << " " << p.second; return os; } template std::ostream &operator<<(std::ostream &os, const std::vector &a) { for(int i = 0; i < int(a.size()); ++i) { if(i) os << " "; os << a[i]; } return os; } std::ostream &operator<<(std::ostream &dest, __int128_t &value) { std::ostream::sentry s(dest); if(s) { __uint128_t tmp = value < 0 ? -value : value; char buffer[128]; char *d = std::end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while(tmp != 0); if(value < 0) { --d; *d = '-'; } int len = std::end(buffer) - d; if(dest.rdbuf()->sputn(d, len) != len) { dest.setstate(std::ios_base::badbit); } } return dest; } #if __has_include() std::ostream &operator<<(std::ostream &os, const atcoder::modint998244353 &a) { return os << a.val(); } std::ostream &operator<<(std::ostream &os, const atcoder::modint1000000007 &a) { return os << a.val(); } template std::ostream &operator<<(std::ostream &os, const atcoder::static_modint &a) { return os << a.val(); } template std::ostream &operator<<(std::ostream &os, const atcoder::dynamic_modint &a) { return os << a.val(); } #endif template void print(const T a) { std::cout << a << '\n'; } template void print(Head H, Tail... T) { std::cout << H << ' '; print(T...); } template void printel(const T a) { std::cout << a << '\n'; } template void printel(const std::vector &a) { for(const auto &v : a) std::cout << v << '\n'; } template void printel(Head H, Tail... T) { std::cout << H << '\n'; printel(T...); } inline void Yes(bool b = true) { cout << (b ? "Yes" : "No") << '\n'; } inline void YES(bool b = true) { cout << (b ? "YES" : "NO") << '\n'; } inline void OKNG(bool b = true) { cout << (b ? "OK" : "NG") << '\n'; } inline void possible(bool i = true){ cout << (i?"possible":"impossible") << '\n'; } inline void Possible(bool i = true){ cout << (i?"Possible":"Impossible") << '\n'; } inline void POSSIBLE(bool i = true){ cout << (i?"POSSIBLE":"IMPOSSIBLE") << '\n'; } void err(const bool b = true) { if(b) { std::cout << "-1\n", exit(0); } } //debug macro namespace debugger { template void view(const std::vector &a) { std::cerr << "{ "; for(const auto &v : a) { std::cerr << v << ", "; } std::cerr << "\b\b }"; } template void view(const std::vector> &a) { std::cerr << "{\n"; for(const auto &v : a) { std::cerr << "\t"; view(v); std::cerr << "\n"; } std::cerr << "}"; } template void view(const std::vector> &a) { std::cerr << "{\n"; for(const auto &p : a) std::cerr << "\t(" << p.first << ", " << p.second << ")\n"; std::cerr << "}"; } template void view(const std::map &m) { std::cerr << "{\n"; for(const auto &p : m) std::cerr << "\t[" << p.first << "] : " << p.second << "\n"; std::cerr << "}"; } template void view(const std::pair &p) { std::cerr << "(" << p.first << ", " << p.second << ")"; } template void view(const std::set &s) { std::cerr << "{ "; for(auto &v : s) { view(v); std::cerr << ", "; } std::cerr << "\b\b }"; } template void view(const T &e) { std::cerr << e; } } // namespace debugger #ifdef LOCAL void debug_out() {} template void debug_out(Head H, Tail... T) { debugger::view(H); std::cerr << ", "; debug_out(T...); } #define debug(...) \ do { \ std::cerr << __LINE__ << " [" << #__VA_ARGS__ << "] : ["; \ debug_out(__VA_ARGS__); \ std::cerr << "\b\b]\n"; \ } while(false) #else #define debug(...) (void(0)) #endif // math macro template inline bool chmin(T &a, const U &b) { return a > b ? a = b, true : false; } template inline bool chmax(T &a, const U &b) { return a < b ? a = b, true : false; } template //切り捨て T div_floor(T a, T b) { if (b < 0) a *= -1, b *= -1; return a >= 0 ? a / b : (a + 1) / b - 1; } template T div_ceil(T a, T b) { //切り上げ if (b < 0) a *= -1, b *= -1; return a > 0 ? (a - 1) / b + 1 : a / b; } template T POW(T a, long long n) { T ret = 1; while(n) { if(n & 1) ret *= a; a *= a; n >>= 1; } return ret; } // modpow long long POW(long long a, long long n, const int mod) { long long ret = 1; while(n) { if(n & 1) (ret *= a) %= mod; (a *= a) %= mod; n >>= 1; } return ret; } int topbit(ll t) { return t == 0 ? -1 : 63 - __builtin_clzll(t); } int lowbit(ll a) { return a == 0 ? 64 : __builtin_ctzll(a); } ll allbit(ll n) { return (1LL << n) - 1; } bool ispow2(int i) { return i && (i & -i) == i; } // others struct fast_io { fast_io() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); } } fast_io_; #define endl '\n' #pragma endregion int dy[8] = {0,1,0,-1,-1,1,1,-1}; int dx[8] = {1,0,-1,0,1,1,-1,-1}; bool range(int y, int x, int h, int w){ if(y < 0 || x < 0 || y >= h || x >= w) return false; else return true; } //const int MOD=1000000007; const int MOD=998244353; //using mint = modint1000000007; //using mint = modint998244353; const ll INF=1e18+1; const int inf = 1000000001; //const ll INF = numeric_limits::max() / 4; //const int inf = numeric_limits::max() / 4; const int M = 510000; const int MAX = 1000010; const double PI=acos(-1); void main_() { string s, t ,u; int n; cin >> s >> t >> n >> u; cout << s << " " << t << " " << n+1 << " "<< u << endl; } int main() { int T; cin >> T; while(T--) main_(); return 0; }