#include <iostream>
#include <vector>
#include <fstream>
#include <ctime>
#include <random>
#include <algorithm>
#include <cassert>
#include <queue>
#include <cstring>
#include <unordered_map>
using namespace std;

random_device rand_dev;
mt19937_64 generator(rand_dev());
main() {
    srand(time(0));
    for(int i = 21; i <= 23; i++) {
        int n = 1+generator()%(100000-1);
        vector<long long> p;
        for(int i = 1; i <= n; i++) p.push_back(abs((long long)generator()%2000000000000000000LL)-1000000000000000000LL);
        ofstream in(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".in");
        ofstream out(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".out");
        in << -3 << endl;
        in << n << endl;
        for(auto x : p) in << x << " ";
        in << endl;
        out << *max_element(p.begin(), p.end())-*min_element(p.begin(), p.end()) << endl;
    }
    for(int i = 24; i <= 27; i++) {
        int n = 1+generator()%(100000-1);
        vector<long long> p;
        for(int i = 1; i <= n; i++) p.push_back(abs((long long)generator()%1000000000000000000LL));
        ofstream in(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".in");
        ofstream out(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".out");
        in << -3 << endl;
        in << n << endl;
        for(auto x : p) in << x << " ";
        in << endl;
        out << *max_element(p.begin(), p.end())-*min_element(p.begin(), p.end()) << endl;
    }
    for(int i = 28; i <= 30; i++) {
        int n = 1+generator()%(100000-1);
        vector<long long> p;
        for(int i = 1; i <= n; i++) p.push_back(-abs((long long)generator()%1000000000000000000LL));
        ofstream in(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".in");
        ofstream out(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".out");
        in << -3 << endl;
        in << n << endl;
        for(auto x : p) in << x << " ";
        in << endl;
        out << *max_element(p.begin(), p.end())-*min_element(p.begin(), p.end()) << endl;
    }
}