You work in a company that develops a system for analyzing text messages. It is necessary to create a function that turns the text backwards in advance to check the palindrome and analyze the structure of messages. Write the recursive function Reverse_string (S), which takes the line and returns it in the reverse order. Then create a program that reads several lines and displays their converted versions in a sorted manner.
Input format
The first line contains the number n-the number of text messages. The following n lines contain the messages for processing
Output format
the converted lines sorted in lexicographic order, each on the new line
Hint
There will be no clue here, decide for yourself!