public class OmaSatu {
    public static long a = 1234577;
    public static long b = 1234567891;
    public static long x = 12345;

    public static long arvo() {
        x = a*x+b;
        x %= (2L<<32);
        return x;
    }

    public static void main(String[] args) {
        int[] heitot = new int[1000000];
        for (int i = 0; i < 1000000; i++) {
            heitot[i] = (int)(arvo()%6+1);
        }
        int[] tilasto = new int[6+1];
        for (int i = 0; i < 1000000; i++) {
            tilasto[heitot[i]]++;
        }
        System.out.println("Tilasto:");
        for (int i = 1; i <= 6; i++) {
            System.out.println(i + ": " + tilasto[i]);
        }
    }
}
