add length of last word, permutation sequence, rotate list