#include <bits/stdc++.h>
#include "testlib.h"
 
using namespace std;
#define all(x) x.begin(), x.end()
// const int SUMK = 1LL00'000;
// const long long MAXM = 200'000'000'000'000LL;
 
int main(int argc, char** argv) {
    registerGen(argc, argv, 1LL);
    int T = 5000;
    println(T);
    int start = opt<int>("start", 0);
    int to_shuffle = opt<int>("shuffle", 0);
    vector<long long> tests;
    tests.push_back((1LL << 59) - 1LL);
    for (int i = 0; i < 58; i++){
        tests.push_back(((1LL << 59) - 1LL) ^ (1LL << i));
        for (int j = i + 1LL; j < 58; j++){
            tests.push_back(((1LL << 59) - 1LL) ^ (1LL << i) ^ (1LL << j));
            for (int k = j + 1; k < 58; k++){
                tests.push_back(((1LL << 59) - 1LL) ^ (1LL << i) ^ (1LL << j) ^ (1LL ^ k));
            }
        }
    }
    
    if (to_shuffle){
        shuffle(all(tests));
    }
    for (int i = 0; i < T; i++){
        println(tests[(i + start) % (tests.size())]);
    }
    return 0;
}
