Arrangements of letters with repetition