#include <stdio.h>

f(n){return--n?f(n)*~-f(n)+1:2;}

int main(void) {
	int n;
	for (n = 1; n < 6; n++) printf("%u\n", f(n));
	return 0;
}
