import java.math.BigInteger;

public class do18 {
    public static void main(String[] args) {
        BigInteger x = BigInteger.ONE;
        for (int i = 2;; i++) {
            StringBuilder sb = new StringBuilder(x.toString());
            System.out.println(sb.reverse());
            x = x.multiply(BigInteger.valueOf(i));
            if (x.toString().length() > 100)
                return;
        }
    }
}