import java.util.ArrayList;


public class MT3_Review {
	public static void main(String[] args) {
		int[] nums = new int[10];
		ArrayList<Integer> alnums = new ArrayList<Integer>();
		String[] strs = { "No", "where", " ", "Man" };
		// int[][] stuff = new int[2][3];
		int[][] stuff = { { 1, 2, 6 }, {3, 4, 5} };
		
		fiboArray(nums);
		printArray(nums);
		fiboArrayList(alnums,13);
		System.out.println(alnums);
		System.out.println(concatenateStrings(strs));
		System.out.println(sum2d(stuff));
	}
	
	private static int sum2d(int[][] stuff) {
		int sum = 0;
		for (int i = 0; i < stuff.length; i++) {
			for (int j = 0; j < stuff[0].length; j++) {
				sum += stuff[i][j];
			}
		}
		return sum;
	}

	public static void fiboArray(int[] arr) {
		arr[0] = 1;
		arr[1] = 1;
		for (int i = 2; i < arr.length; i++) {
			arr[i] = arr[i-1] + arr[i-2];
		}
	}
	
	public static void printArray(int[] nums) {
		for (int i : nums) {
			System.out.print(i + " ");
		} System.out.println();
	}
	
	public static void fiboArrayList(ArrayList<Integer> arr, int n) {
		arr.add(1);
		arr.add(1);
		for (int i = 2; i < n; i++) {
			arr.add(arr.get(i-1) + arr.get(i-2));
		}
	}

	public static String concatenateStrings(String[] arr) {
		String result = "";
		for (int i = 0; i < arr.length; i++) {
			result += arr[i];
		}
		return result;
	}
}