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

public class elevator_gk_square_dump {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        int n = 50;

        int[] q = new int[n];

        for (int a = 1; a <= n; a++) {
            for (int b = 1; b <= a; b++) {
                for (int c = 1; c <= b; c++) {
                    Arrays.fill(q, Integer.MAX_VALUE);
                    for (int x = 0; x < c; x++) {
                        for (int y = 0; y < c; y++) {
                            int v = a * x + b * y;
                            int f = v % c;
                            q[f] = Math.min(q[f], v);
                        }
                    }
                    System.out.format("------- %d %d %d\n", a, b, c);
                    for (int i = 0; i < c; i++) {
                        System.out.println(q[i]);
                    }
                }
            }
        }

        PrintWriter w = new PrintWriter(System.out);
        w.close();
    }
}
