Specifically, given any adjective, your program will return its comparative form by appending “er” to it. Note that if the adjective already ends in “e”, you should only append “r”. If your program is given an adjective already in its comparative form, your program should return the superlative form of the adjective created by simply replacing the “er” with “est”. Your program should consider any string that ends in “er” to be an adjective in comparative form.
Input:
The first line of the input contains an integer n that represents the number of data collections that follow where each data collection is on a single line. Each input line contains a string representing an adjective or its comparative form. Each string will be given in all lower case letters.
Output:
Your program should produce n lines of output (one for each data collection). Each line should be in lower case letters. If the input is the comparative form of an adjective (ends in “er”), your program should output the superlative form.
Sample Input:
3
warm
smaller
rare
Sample Output:
warmer
smallest
rarer