array sorted by last letter of a word'