print('\n'.join(["Case #{0}: {1} 0 {1} 0 0 0".format(i+1,input()) for i in range(int(input()))]))
#include <bits/stdc++.h> using namespace std; int main() { int T, N; cin >> T; for (int i = 0; i < T; i++) { cin >> N; cout << "Case #" << i + 1 << ": "; printf("%d 0 %d 0 0 0\n", N, N); } return 0; }
print('\n'.join(["Case #{0}: {1} 0 {1} 0 0 0".format(i+1,input()) for i in range(int(input()))]))