Sequences Obtained from a Series of Permutations of Borders and Ultimately Periodic Words