public class recursive {

	public static int fibonacci(int max) {

		if (max <= 1) {
			return max;
		}

		else {
			return fibonacci(max - 2) + fibonacci(max - 1);
		}

	}

	public static void main(String[] args) {

		int max = 10;
		for (int i = 0; i < max; i++) {
		    System.out.print(fibonacci(i) + " ");
		}
	}
}