The function takes a word and returns the first letter if the length is less than or equal to 10, and returns the last letter if the length is greater than 10.
