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

public class TestGen {
    private static int nTests;
    private static Random random = new Random(42);

    public static void write(Instance x) {
        try {
            PrintWriter out = new PrintWriter(String.format("%02d", nTests + 1));
            Integer[] t = new Integer[] {x.vs[0], x.vs[1], x.vs[2]};
            Collections.shuffle(Arrays.asList(t), random);
            out.println(t[0] + " " + t[1] + " " + t[2]);
            out.close();
            ++nTests;
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    private static class Instance {
        public final int[] vs;
        public Instance(int a, int b, int c) {
            this.vs = new int[] {a, b, c};
            Arrays.sort(vs);
        }
        public int hashCode() {
            return Arrays.hashCode(vs);
        }
        public boolean equals(Object o) {
            return Arrays.equals(vs, ((Instance) (o)).vs);
        }
    }

    private static class Classifier {
        private List<Instance> less = new ArrayList<Instance>();
        private List<Instance> equal = new ArrayList<Instance>();
        private List<Instance> greater = new ArrayList<Instance>();
        private List<Instance> undefined = new ArrayList<Instance>();
        private Set<Instance> used = new HashSet<Instance>();

        public void add(Instance instance, boolean addEven) {
            if (!addEven && (instance.vs[0] + instance.vs[1] + instance.vs[2]) % 2 == 0) {
                return;
            }
            if (!used.contains(instance)) {
                int a = instance.vs[0];
                int b = instance.vs[1];
                int c = instance.vs[2];
                if (a + b < c) {
                    if (undefined.size() < 12) {
                        undefined.add(instance);
                        used.add(instance);
                    }
                } else {
                    long sqDiff = (long)a * a + (long)b * b - (long)c * c;
                    if (sqDiff < 0) {
                        if (less.size() < 13) {
                            less.add(instance);
                            used.add(instance);
                        }
                    } else if (sqDiff > 0) {
                        if (greater.size() < 20) {
                            greater.add(instance);
                            used.add(instance);
                        }
                    } else {
                        if (equal.size() < 5) {
                            equal.add(instance);
                            used.add(instance);
                        }
                    }
                }
            }
        }

        public boolean isReady() {
            return used.size() == 50;
        }
    }

    public static void main(String[] args) throws IOException {
        Classifier c = new Classifier();

        int[] sides = {1, 2, 3};
        for (int a : sides) {
            for (int b : sides) {
                for (int d : sides) {
                    c.add(new Instance(a, b, d), true);
                }
            }
        }
        c.add(new Instance(1, 1, 100000), true);
        c.add(new Instance(100000, 100000, 100000), true);

        while (!c.isReady()) {
            if (random.nextInt(4) == 3) {
                int a = random.nextInt(200) + 1;
                int b = random.nextInt(200) + 1;
                if (a == b) {
                    continue;
                }
                c.add(new Instance(a * a + b * b, Math.abs(a * a - b * b), 2 * a * b), true);
            }
            c.add(new Instance(1 + random.nextInt(100000), 1 + random.nextInt(100000), 1 + random.nextInt(100000)), false);
        }
        for (Instance i : c.less) {
            write(i);
        }
        for (Instance i : c.undefined) {
            write(i);
        }
        for (Instance i : c.greater) {
            write(i);
        }
        for (Instance i : c.equal) {
            write(i);
        }
    }
}
