public static void main(String[] args){
		int i, j, n, array[];

			Scanner in = new Scanner(System.in);
			System.out.println("Enter number of elements");
			
			n = in.nextInt();
			array = new int[n];
		
			System.out.println("Enter " + n + " integers");
	
			for(i = 0; i < n; i++)
				array[i] = in.nextInt();

			/**
			 *Merge Sort
			 */
			mergeSort(array, 0, n-1);
			for(i= 0; i < n; i++)
				System.out.print(array[i]+ " ");

			System.out.println();
			
	}