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

public class TestsGen {

    static int done = 0;

    final Random rand = new Random(17239);

    final int MAX_VERTEX = 100_000;
    final int MAX_EDGES = 100_000;
    final int MAX_PATH = 100_000;
    final int MAX_EDGE_IN_PATH = 300_000;

    class Edge implements Comparable<Edge> {
        int from, to, id;

        public Edge(int from, int to, int id) {
            super();
            this.from = from;
            this.to = to;
            this.id = id;
        }

        @Override
        public int hashCode() {
            final int prime = 1000007;
            int result = 1;
            result = prime * result + getOuterType().hashCode();
            result = prime * result + to;
            result = prime * result + from;
            return result;
        }

        @Override
        public boolean equals(Object obj) {
            if (this == obj)
                return true;
            if (obj == null)
                return false;
            if (getClass() != obj.getClass())
                return false;
            Edge other = (Edge) obj;
            if (!getOuterType().equals(other.getOuterType()))
                return false;
            if (from != other.from)
                return false;
            if (to != other.to)
                return false;
            return true;
        }

        @Override
        public String toString() {
            return (from + 1) + " " + (to + 1) + " " + (id + 1);
        }

        @Override
        public int compareTo(Edge other) {
            return Integer.compare(this.hashCode(), other.hashCode());
        }

        private TestsGen getOuterType() {
            return TestsGen.this;
        }

    }

    class Graph {
        int n, m;
        HashSet<Edge> setEdges;
        ArrayList<Edge>[] edges;
        Edge[] idToEdge = new Edge[MAX_EDGES];

        public Graph(int n) {
            super();
            this.n = n;
            this.m = 0;
            this.setEdges = new HashSet<>();
            this.edges = new ArrayList[n];
            for (int i = 0; i < n; i++) {
                edges[i] = new ArrayList<Edge>();
            }
        }

        public void addEdge(Edge edge) {
            if (!setEdges.contains(edge)) {
                edge.id = m++;
                setEdges.add(edge);
                edges[edge.from].add(edge);
                idToEdge[m - 1] = edge;
            }
        }

        void swapEdge(int u, int v) {
            // System.err.println(u + " " + v + " " + graph.m);
            int tmp = idToEdge[v].id;
            idToEdge[v].id = idToEdge[u].id;
            idToEdge[u].id = tmp;
        }

        void clear() {
            setEdges.clear();
            for (int i = 0; i < n; i++) {
                edges[i].clear();
            }
            n = 0;
            m = 0;
        }
    }

    class Path {
        int start, end;
        ArrayList<Edge> path;

        public Path(ArrayList<Edge> path) {
            super();
            this.start = path.get(0).from;
            ArrayList<Edge> tmp = new ArrayList<>();
            for (int i = 0; i < path.size(); i++) {
                Edge e = path.get(i);
                tmp.add(new Edge(e.from, e.to, e.id));
            }
            this.path = tmp;
            this.end = path.get(path.size() - 1).to;
        }

        @Override
        public String toString() {
            StringBuffer sb = new StringBuffer();
            int len = path.size();
            sb.append(len + " " + (start + 1) + " " + (end + 1));
            sb.append("\r\n");
            sb.append(path.get(0).id + 1);
            for (int i = 1; i < len; i++) {
                sb.append(" " + (path.get(i).id + 1));
            }
            return sb.toString();
        }

    }

    Graph genBamboo(int n) {
        Graph g = new Graph(n);
        for (int i = 1; i < n; i++) {
            g.addEdge(new Edge(i - 1, i, i - 1));
        }
        return g;
    }

    Graph genTree(int n) {
        Graph g = new Graph(n);
        for (int i = 1; i < n; i++) {
            g.addEdge(new Edge(rand.nextInt(i), i, i - 1));
        }
        return g;
    }

    Graph genCycle(int n) {
        Graph g = new Graph(n);
        for (int i = 1; i < n; i++) {
            g.addEdge(new Edge(i - 1, i, i - 1));
        }
        g.addEdge(new Edge(n - 1, 0, n - 1));
        return g;
    }

    Graph genFill(int n) {
        Graph g = new Graph(n);
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                g.addEdge(new Edge(i, j, g.m));
            }
        }
        return g;
    }

    Graph genRandom(int n, int m) {
        Graph g;
        if (rand.nextBoolean()) {
            g = genTree(n);
        } else {
            g = genCycle(n);
        }
        while (g.m < m) {
            int from = rand.nextInt(n);
            int to = rand.nextInt(n);
            while (to == from) {
                to = rand.nextInt(n);
            }
            g.addEdge(new Edge(from, to, g.m));
        }
        return g;
    }

    TreeSet<Integer> notUsing;

    int[] used;
    int time;

    ArrayList<Integer> go(Edge ee, int len) {
        return go(ee, len, false);
    }

    ArrayList<Integer> go(Edge ee, int len, boolean isUsed) {
        ArrayList<Integer> path = new ArrayList<>();
        used[ee.from] = used[ee.to] = time;
        path.add(ee.id);
        int v = ee.to;
        for (int i = 1; i < len; i++) {
            used[v] = time;
            int u = 0, pp = 0;
            int size = graph.edges[v].size();
            if (size == 0)
                break;
            for (int j = 0; j < 7; j++) {
                pp = rand.nextInt(size);
                u = graph.edges[v].get(pp).to;
                if (used[u] < time) {
                    if (isUsed) {
                        if (notUsing.contains(graph.edges[v].get(pp).id)) {
                            break;
                        }
                    } else {
                        break;
                    }
                }
            }
            if (used[u] == time || isUsed
                    & !notUsing.contains(graph.edges[v].get(pp).id)) {
                break;
            }
            path.add(graph.edges[v].get(pp).id);
            v = u;
        }
        return path;
    }

    ArrayList<Path> coverPath(int len) {
        return coverPath(len, false);
    }

    ArrayList<Path> coverPath(int len, boolean isUsed) {
        ArrayList<Path> res = new ArrayList<>();
        notUsing = new TreeSet<>();
        for (int i = 0; i < graph.m; i++) {
            notUsing.add(i);
        }
        time = 0;
        used = new int[graph.n];

        while (notUsing.size() > 0) {
            Edge edge = graph.idToEdge[0];
            for (int k : notUsing) {
                edge = graph.idToEdge[k];
                break;
            }

            time++;
            ArrayList<Integer> path = go(edge, len, isUsed);

            ArrayList<Edge> tmp = new ArrayList<>();
            for (int id : path) {
                tmp.add(graph.idToEdge[id]);
                notUsing.remove(id);
            }
            res.add(new Path(tmp));
        }
        return res;
    }

    Graph graph;
    int swapTo, swapFrom;
    ArrayList<Path> paths;

    void print() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.println(graph.n + " " + graph.m);
        ArrayList<Integer> perm = new ArrayList<Integer>();
        for (int i = 0; i < graph.m; i++) {
            perm.add(i);
        }

        Collections.shuffle(perm, rand);
        graph.swapEdge(swapFrom, swapTo);
        for (int i = 0; i < graph.m; i++) {
            out.println(graph.idToEdge[perm.get(i)]);
        }

        out.println(paths.size());
        for (int i = 0; i < paths.size(); i++) {
            out.println(paths.get(i));
        }
        paths.clear();
        graph.clear();

        out.close();
    }

    void genSimple() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.println("6 6\r\n" + "" + "1 2 1\r\n" + "2 3 3\r\n" + "3 6 6\r\n"
                + "1 4 4\r\n" + "4 5 5\r\n" + "5 6 2\r\n" + "2\r\n"
                + "3 1 6\r\n" + "1 5 6\r\n" + "3 1 6\r\n" + "4 3 2");
        out.close();
    }

    void handTest1() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.println("4 4\r\n" + "1 2 1\r\n" + "1 3 2\r\n" + "2 4 3\r\n"
                + "3 4 4\r\n" + "2\r\n" + "2 1 4\r\n" + "2 3\r\n" + "2 1 4\r\n"
                + "1 4");
        out.close();
    }

    void handTest2() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.println("4 6\r\n" + "1 2 1\r\n" + "1 3 2\r\n" + "2 4 4\r\n"
                + "3 4 5\r\n" + "3 2 3\r\n" + "2 3 6\r\n" + "2\r\n"
                + "3 1 4\r\n" + "1 3 5\r\n" + "3 1 4\r\n" + "2 6 4");
        out.close();
    }

    void handTest3() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.println("4 2\r\n" + "1 2 1\r\n" + "3 4 2\r\n" + "2\r\n"
                + "1 1 2\r\n" + "2\r\n" + "1 3 4\r\n" + "1");
        out.close();
    }

    void antiNotSimplePath() throws IOException {
        done++;
        System.err.println(done);
        PrintWriter out = new PrintWriter(String.format("../tests/%02d", done));
        out.print("9 10\r\n" + "1 2 10\r\n" + "2 3 9\r\n" + "3 4 8\r\n"
                + "4 5 7\r\n" + "5 6 6\r\n" + "6 7 5\r\n" + "7 8 4\r\n"
                + "8 9 3\r\n" + "1 6 2\r\n" + "6 3 1\r\n" + "2\r\n"
                + "8 1 9\r\n" + "2 9 8 7 6 5 4 3\r\n" + "4 1 5\r\n"
                + "10 1 8 7\r\n");
        out.close();

        done++;
        System.err.println(done);
        out = new PrintWriter(String.format("../tests/%02d", done));
        out.print("9 10\r\n" + "1 2 1\r\n" + "2 3 2\r\n" + "3 4 3\r\n"
                + "4 5 4\r\n" + "5 6 5\r\n" + "6 7 6\r\n" + "7 8 7\r\n"
                + "8 9 8\r\n" + "1 6 9\r\n" + "6 3 10\r\n" + "2\r\n"
                + "8 1 9\r\n" + "9 2 3 4 5 6 7 8\r\n" + "4 1 5\r\n"
                + "1 10 3 4\r\n");
        out.close();
    }

    public void run() throws IOException {
        boolean f = new File("../tests").mkdir();

        // 1
        genSimple();

        // 2-4
        handTest1();
        handTest2();
        handTest3();

        // 5 - 6
        antiNotSimplePath();

        // 7 - 12
        for (int i = 0; i < 4; i++) {
            for (int j = i + 1; j < 4; j++) {
                graph = genBamboo(5);
                paths = coverPath(4);
                swapFrom = i;
                swapTo = j;
                print();
            }
        }

        // 13
        {
            graph = genTree(10);
            paths = coverPath(3);
            swapFrom = 2;
            swapTo = 4;
            print();
        }

        // 14
        {
            graph = genFill(6);
            paths = coverPath(3);
            swapFrom = 3;
            swapTo = 4;
            print();
        }

        // 15
        {
            graph = genFill(50);
            paths = coverPath(10);
            swapFrom = 21;
            swapTo = 34;
            print();
        }

        // 16
        {
            graph = genRandom(76, 800);
            paths = coverPath(23);
            swapFrom = 234;
            swapTo = 543;
            print();
        }

        // 17
        {
            graph = genCycle(100);
            paths = coverPath(17);
            swapFrom = 0;
            swapTo = 99;
            print();

        }

        // 18
        {
            graph = genTree(100);
            paths = coverPath(10);
            swapFrom = 66;
            swapTo = 67;
            print();
        }

        // 19
        {
            graph = genFill(350);
            paths = coverPath(30, true);
            swapFrom = 210;
            swapTo = 32344;
            print();
        }

        // 20
        {
            int n = MAX_VERTEX / 3 - 10;
            graph = new Graph(n + 1);
            graph.addEdge(new Edge(0, 1, 0));
            for (int i = 1; i < n - 1; i++) {
                graph.addEdge(new Edge(1, i + 1, i));
            }
            for (int i = n - 1; i < 2 * n - 3; i++) {
                graph.addEdge(new Edge(i - n + 3, n, i));
            }
            paths = new ArrayList<>();
            for (int i = 1; i < n - 1; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[0]);
                tmp.add(graph.idToEdge[i]);
                tmp.add(graph.idToEdge[i + n - 2]);
                paths.add(new Path(tmp));
            }
            swapTo = 1;
            swapFrom = (n - 1) / 2;
            print();
        }

        // 21 - 22
        for (int ii = 0; ii < 2; ii++) {
            int n = (MAX_VERTEX - 4) / 6;
            graph = new Graph(n + 4);
            graph.addEdge(new Edge(0, 1, 0));
            for (int i = 1; i < n - 1; i++) {
                graph.addEdge(new Edge(1, i + 1, i));
            }
            for (int i = n - 1; i < 2 * n - 3; i++) {
                graph.addEdge(new Edge(i - n + 3, n, i));
            }
            graph.addEdge(new Edge(n, n + 1, 2 * n - 3));
            graph.addEdge(new Edge(n, n + 2, 2 * n - 2));
            graph.addEdge(new Edge(n + 1, n + 3, 2 * n - 1));
            graph.addEdge(new Edge(n + 2, n + 3, 2 * n));
            paths = new ArrayList<>();
            for (int i = 1; i < n - 1; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[0]);
                tmp.add(graph.idToEdge[i]);
                tmp.add(graph.idToEdge[i + n - 2]);
                tmp.add(graph.idToEdge[2 * n - 3]);
                tmp.add(graph.idToEdge[2 * n - 1]);
                paths.add(new Path(tmp));
            }
            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[0]);
            tmp.add(graph.idToEdge[1]);
            tmp.add(graph.idToEdge[n - 1]);
            tmp.add(graph.idToEdge[2 * n - 2]);
            tmp.add(graph.idToEdge[2 * n]);
            paths.add(new Path(tmp));
            swapTo = 2 * n - 3 + ii * 2;
            swapFrom = 2 * n - 2 + ii * 2;
            print();
        }

        // 23 - 25
        for (int i = 0; i < 3; i++) {
            graph = genRandom(MAX_VERTEX / 2, MAX_EDGES);
            paths = coverPath(MAX_VERTEX / 2, true);
            swapFrom = rand.nextInt(MAX_EDGES / 2);
            swapTo = rand.nextInt(MAX_EDGES / 2) + 2;
            print();
        }

        // 26 - 27
        for (int ii = 0; ii < 2; ii++) {
            int n = MAX_VERTEX - 754;
            graph = new Graph(MAX_VERTEX);

            for (int i = 0; i < MAX_EDGES; i++) {
                int from = rand.nextInt(n);
                int to = rand.nextInt(n);
                while (to == from) {
                    to = rand.nextInt(n);
                }
                graph.addEdge(new Edge(from, to, i));
            }
            paths = coverPath(1000, true);
            swapFrom = graph.m - 50;
            swapFrom = graph.m - 100;
            print();
        }

        // 28
        {
            int n = 66666;
            graph = new Graph(n + 1);
            for (int i = 0; i < n / 2; i++) {
                graph.addEdge(new Edge(i, n / 2, i));
            }
            for (int i = n / 2; i < n - 1; i++) {
                graph.addEdge(new Edge(n / 2, i + 1, i));
            }
            paths = coverPath(2, true);
            swapFrom = 234;
            swapTo = 24244;
            print();
        }

        // 29
        {
            int n = 44444;
            graph = new Graph(n + 1);
            for (int i = 0; i < n / 2; i++) {
                graph.addEdge(new Edge(i, n / 2, i));
            }
            for (int i = n / 2; i < n - 1; i++) {
                graph.addEdge(new Edge(n / 2, i + 1, i));
            }
            paths = coverPath(2, false);
            swapFrom = 1;
            swapTo = 40002;
            print();
        }

        // 30
        {
            int n = 49321;
            graph = new Graph(n + 1);
            for (int i = 0; i < n - 2; i++) {
                graph.addEdge(new Edge(i, n - 2, i));
            }
            graph.addEdge(new Edge(n - 2, n - 1, n - 2));
            graph.addEdge(new Edge(n - 2, n, n - 1));
            paths = new ArrayList<>();
            for (int i = 0; i < n - 2; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[i]);
                tmp.add(graph.idToEdge[n - 2]);
                paths.add(new Path(tmp));
            }
            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[2345]);
            tmp.add(graph.idToEdge[n - 1]);
            paths.add(new Path(tmp));
            swapFrom = n - 1;
            swapTo = n - 2;
            print();
        }

        // 31
        {
            int n = 32101;
            graph = new Graph(n + 2);
            for (int i = 0; i < n - 2; i++) {
                graph.addEdge(new Edge(i, n - 2, i));
            }
            graph.addEdge(new Edge(n - 2, n - 1, n - 2));
            graph.addEdge(new Edge(n - 2, n, n - 1));
            graph.addEdge(new Edge(n - 1, n + 1, n));
            graph.addEdge(new Edge(n, n + 1, n + 1));
            paths = new ArrayList<>();
            for (int i = 0; i < n - 2; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[i]);
                tmp.add(graph.idToEdge[n - 2]);
                tmp.add(graph.idToEdge[n]);
                paths.add(new Path(tmp));
            }
            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[2345]);
            tmp.add(graph.idToEdge[n - 1]);
            tmp.add(graph.idToEdge[n + 1]);
            paths.add(new Path(tmp));
            swapFrom = n - 1;
            swapTo = n - 2;
            print();
        }

        // 32
        {
            int n = 55555;
            graph = new Graph(n + 1);
            for (int i = 0; i + 3 < n; i += 3) {
                graph.addEdge(new Edge(i, i + 1, i * 4));
                graph.addEdge(new Edge(i, i + 2, i * 4 + 1));
                graph.addEdge(new Edge(i + 1, i + 3, i * 4 + 2));
                graph.addEdge(new Edge(i + 2, i + 3, i * 4 + 3));
            }
            paths = coverPath(100000, true);

            swapFrom = 40000;
            swapTo = 40001;
            print();
        }

        // 33
        {
            int n = 55555;
            graph = new Graph(n + 1);
            for (int i = 0; i + 3 < n; i += 3) {
                graph.addEdge(new Edge(i, i + 1, i * 4));
                graph.addEdge(new Edge(i, i + 2, i * 4 + 1));
                graph.addEdge(new Edge(i + 1, i + 3, i * 4 + 2));
                graph.addEdge(new Edge(i + 2, i + 3, i * 4 + 3));
            }
            paths = coverPath(4, false);

            swapFrom = 60002;
            swapTo = 60003;
            print();
        }

        // 34
        {
            graph = genCycle(MAX_VERTEX);
            paths = coverPath(MAX_EDGE_IN_PATH, true);
            swapTo = 77777;
            swapFrom = 66666;
            print();
        }

        // 35
        {
            int n = 11000;
            graph = new Graph(n + 1);
            graph.addEdge(new Edge(0, 1, 0));
            graph.addEdge(new Edge(1, 2, 1));
            graph.addEdge(new Edge(1, 3, 2));
            graph.addEdge(new Edge(2, 4, 3));

            for (int i = 0; i < n - 4; i++) {
                graph.addEdge(new Edge(3, n - i, i + 4));
            }

            paths = new ArrayList<>();
            for (int j = 0; j < 3; j++) {
                for (int i = 0; i < n - 4; i++) {
                    ArrayList<Edge> tmp = new ArrayList<>();
                    tmp.add(graph.idToEdge[0]);
                    tmp.add(graph.idToEdge[2]);
                    tmp.add(graph.idToEdge[i + 4]);
                    paths.add(new Path(tmp));
                }
            }
            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[0]);
            tmp.add(graph.idToEdge[1]);
            tmp.add(graph.idToEdge[3]);
            paths.add(new Path(tmp));
            swapFrom = 2;
            swapTo = 1;
            print();
        }

        // 36
        {
            int n = 11000;
            graph = new Graph(n + 1);
            for (int i = 0; i < n - 4; i++) {
                graph.addEdge(new Edge(3, n - i, i));
            }
            graph.addEdge(new Edge(2, 4, n - 4));
            graph.addEdge(new Edge(1, 3, n - 2));
            graph.addEdge(new Edge(1, 2, n - 3));
            graph.addEdge(new Edge(0, 1, n - 1));

            paths = new ArrayList<>();
            for (int j = 0; j < 3; j++) {
                for (int i = 0; i < n - 4; i++) {
                    ArrayList<Edge> tmp = new ArrayList<>();
                    tmp.add(graph.idToEdge[n - 1]);
                    tmp.add(graph.idToEdge[n - 3]);
                    tmp.add(graph.idToEdge[i]);
                    paths.add(new Path(tmp));
                }
            }
            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[n - 1]);
            tmp.add(graph.idToEdge[n - 2]);
            tmp.add(graph.idToEdge[n - 4]);
            paths.add(new Path(tmp));
            swapFrom = n - 2;
            swapTo = n - 3;
            print();
        }

        // 37
        {
            int n = 33300;
            graph = new Graph(n + 1);
            graph.addEdge(new Edge(0, 1, 0));
            graph.addEdge(new Edge(1, 2, 1));
            graph.addEdge(new Edge(1, 3, 2));
            graph.addEdge(new Edge(2, 4, 3));

            for (int i = 0; i < n - 4; i++) {
                graph.addEdge(new Edge(3, n - i, i + 4));
            }

            paths = new ArrayList<>();

            for (int i = 0; i < n - 4; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[0]);
                tmp.add(graph.idToEdge[2]);
                tmp.add(graph.idToEdge[i + 4]);
                paths.add(new Path(tmp));
            }

            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[0]);
            tmp.add(graph.idToEdge[1]);
            tmp.add(graph.idToEdge[3]);
            paths.add(new Path(tmp));
            swapFrom = 2;
            swapTo = 1;
            print();
        }

        // 38
        {
            int n = 33300;
            graph = new Graph(n + 1);
            for (int i = 0; i < n - 4; i++) {
                graph.addEdge(new Edge(3, n - i, i));
            }
            graph.addEdge(new Edge(2, 4, n - 4));
            graph.addEdge(new Edge(1, 3, n - 2));
            graph.addEdge(new Edge(1, 2, n - 3));
            graph.addEdge(new Edge(0, 1, n - 1));

            paths = new ArrayList<>();

            for (int i = 0; i < n - 4; i++) {
                ArrayList<Edge> tmp = new ArrayList<>();
                tmp.add(graph.idToEdge[n - 1]);
                tmp.add(graph.idToEdge[n - 3]);
                tmp.add(graph.idToEdge[i]);
                paths.add(new Path(tmp));
            }

            ArrayList<Edge> tmp = new ArrayList<>();
            tmp.add(graph.idToEdge[n - 1]);
            tmp.add(graph.idToEdge[n - 2]);
            tmp.add(graph.idToEdge[n - 4]);
            paths.add(new Path(tmp));
            swapFrom = n - 2;
            swapTo = n - 3;
            print();
        }
        
        // 39
        {
            int n = 24900;
            graph = new Graph(2 * n + 1);
            paths = new ArrayList<>();
            for (int ii = 0; ii < 2; ii++) {
                graph.addEdge(new Edge(0, n * ii + 1, 0 + n * ii));
                for (int i = 2; i < n + 1; i++) {
                    ArrayList<Edge> tmp = new ArrayList<>();
                    graph.addEdge(new Edge(n * ii + 1, ii * n + i, n * ii + i - 1));
                    tmp.add(graph.idToEdge[n * ii]);
                    tmp.add(graph.idToEdge[n * ii + i - 1]);
                    paths.add(new Path(tmp));
                }
            }
            swapFrom = 0;
            swapTo = n;
            print();
        }
        return;
    }

    public static void main(String[] args) throws IOException {
        new TestsGen().run();
    }
}
