#include <bits/stdc++.h>
#define INT long long int
using namespace std;
long long int i_S[20] = {9223372036854775807, 14600299104468914, 23688194470858901, 16720242727731913, 8557129841953621, 17290115948804256, 32705081027656415, 1713045678966736, 7889252322740420, 19459038717542529, 5485142470532697, 23940131851584669, 105189507208007, 11385254579348430, 10528179587351139, 32749133274537596, 15340318462153718, 13104219177225968, 3759050079545350, 1107035824150827};

char infile[100], outfile[100];

int main() {
    ios::sync_with_stdio(false);
    INT T,a, b, c[2], n, t, i, I,a1,b1;
    cin >> T;
    for(I=1;I<=20;I++){
        sprintf(infile, ".%d.in", I);
        freopen(infile, "w", stdout);
        printf("%lld\n",I-1);

        sprintf(outfile, ".%d.out", I);
        freopen(outfile, "w", stdout);
        printf("%lld",i_S[I-1]);
      }
}
