private void swapAndPrintCombination(int initialIndex, int[] array) {
        int currentIndex = initialIndex;
        boolean oneRound = false;
        while(true) {
            if(currentIndex == array.length - 1) {
                int[] newArray = new int[array.length];
                newArray[0] = array[currentIndex];
                for(int i = 1; i < array.length; i ++) {
                    newArray[i] = array[i - 1];
                }
                currentIndex = 0;
                oneRound = true;
                //System.out.println(currentIndex + " - " + initialIndex);
                if(currentIndex == initialIndex) {
                    break;
                } else {
                    printArray(newArray);
                }
            } else {
                
                int temp = array[currentIndex];
                array[currentIndex] = array[currentIndex+1];
                array[currentIndex+1] = temp;
                
                if(currentIndex+1 == initialIndex && oneRound) {
                    break;
                }
                
                printArray(array);
                currentIndex++;
                //System.out.println(currentIndex + " - " + initialIndex);
            }
        }
    }