nextPermutation.java