import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CatlanNumbers {

    public static void main(String[] args) {
        Catlan f1 = new Catlan1();
        Catlan f2 = new Catlan2();
        Catlan f3 = new Catlan3();
        System.out.printf("           Formula 1     Formula 2     Formula 3%n");
        for ( int n = 0 ; n <= 15 ; n++ ) {
             System.out.printf("C(%2d) =%,12d %,12d %,12d%n", n, f1.catlin(n), f2.catlin(n), f3.catlin(n));
        }
    }

    private static interface Catlan {
        public BigInteger catlin(long n);
    }

    private static class Catlan1 implements Catlan {