static void getMax(ArrayList<Integer> input, int k, int[] maxNum,ArrayList<Integer> output){
		
		
		if(k==0){
			int sum=0;
			for(int v:input){
				sum*=10;
				sum+=v;
			}//calculate the number after several swaps
			
			if(sum>maxNum[0]){
				maxNum[0]=sum;
				deepCopyList(input,output);	
			}//update the results
	        return;						
		}
		
		  for (int i = 0; i < input.size() - 1; i ++) {
		        for (int j = i + 1; j < input.size(); j ++) {

		            swapList(input,i, j);//try to swap input[i] with input[j]
		            getMax(input, k - 1, maxNum,output);//take care of the other k - 1 swaps
		            swapList(input,i, j);//swap back
		        }
		    }
		   return;
	}