add NextPermutation.java class