import java.io.*;                                       
import java.util.*;

public class TestGen {
    public static void main(String[] args) {
        new TestGen().run();
    }

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }
        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    int tNumber;

    Random rnd;

    void print(int n, int k, int t, ArrayList<Integer> a, ArrayList<Integer> b)
            throws IOException {
        if (tNumber < 10) {
            out = new PrintWriter("../tests/0" + tNumber);
        } else {
            out = new PrintWriter("../tests/" + tNumber);
        }
        out.println(n + " " + k + " " + t);
        for (int i = 0; i < n - 1; i++) out.print(a.get(i) + " ");
        out.println(a.get(n-1));        
        for (int i = 0; i < n - 1; i++) out.print(b.get(i) + " ");
        out.println(b.get(n-1));        
        out.close();
        tNumber++;
    }

    void genSample() throws IOException {
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        a.add(1);
        a.add(5);
        a.add(4);

        b.add(1);
        b.add(11);
        b.add(7);
        print(3, 3, 1, a, b);
    }

    final int MAXX = 10000;
    final int MAXS = 1_000_000_000;
        final int MAXN = 50_000;
        void genSmall() throws IOException {
        ArrayList<Integer> dist = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        dist.add(1);
        b.add(1);
        print(1, 1, 1, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(1);
        b.add(0);
        print(1, 1, 1, dist, b);
        print(1, 1, MAXX, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(1);
        b.add(2);
        print(1, 1, 1, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(1);
        b.add(3);
        print(1, 1, 1, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(MAXX);
        b.add(MAXX);
        print(1, MAXX, MAXX, dist, b);


        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(MAXX);
        dist.add(MAXX);
        dist.add(MAXX);
        b.add(MAXX);
        b.add(MAXX);
        b.add(MAXX);
        print(3, MAXX, MAXX, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        dist.add(MAXX);
        dist.add(MAXX);
        dist.add(MAXX);
        b.add(MAXS);
        b.add(MAXS);
        b.add(MAXS);
        print(3, MAXX, MAXX, dist, b);


    }

    
    void genBig() throws IOException {
        ArrayList<Integer> dist = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        for (int i = 0; i < MAXN; i++) {
            dist.add(MAXX);
            b.add(0);
        }
        print(MAXN, 1, MAXX, dist, b);

        dist = new ArrayList<>();
        b = new ArrayList<>();
        for (int i = 0; i < MAXN; i++) {
            dist.add(1000);
            b.add(2000 + 3000 * i);
        }
        print(MAXN, 1000, 1000, dist, b);


        dist = new ArrayList<>();
        b = new ArrayList<>();
        for (int i = 0; i < MAXN; i++) {
            dist.add(1);
            b.add(1 + 2 * i);
        }
        print(MAXN, MAXX, 1, dist, b);

    }



    void genVeryBig() throws IOException {
        ArrayList<Integer> dist = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        int curB = 0;
        for (int i = 0; i < MAXN; i++) {
            dist.add(MAXX);
            curB += MAXX + MAXX;
            curB = Math.min(curB, MAXS);
            b.add(curB);
            curB += MAXX;
        }
        print(MAXN, MAXX, MAXX, dist, b);
    }

    void genRand(int maxd, int maxb) throws IOException {
        ArrayList<Integer> dist = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        for (int i = 0; i < MAXN; i++) {
            dist.add(rnd.nextInt(maxd) + 1);
            b.add(rnd.nextInt(maxb + 1));
        }
        print(MAXN, rnd.nextInt(maxd) + 1, rnd.nextInt(maxd) + 1, dist, b);
                                                               
    }


    
    public void solve() throws IOException {
        tNumber = 1;
        rnd = new Random(23);
            new File("../tests").mkdir();        
        genSample();
        genSmall();
        genBig();
        genVeryBig();
        for (int i = 0; i < 10; i++) {
            genRand(10, 10 * MAXN);
        }
        for (int i = 0; i < 10; i++) {
            genRand(10000, 10 * MAXN);
        }

    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}