#C12609. Reversing Strings

    ID: 42055 Type: Default 1000ms 256MiB

Reversing Strings

Reversing Strings

This problem requires you to reverse every string in a given list. You will receive a number of strings as input, and your task is to produce reversed versions of each string, outputting them line by line. For any string \( s \), its reversed version \( s_{reversed} \) is defined as \( s_{reversed} = s[n-1] s[n-2] \ldots s[0] \), where \( n \) is the length of the string.

The strings may contain spaces, and the reversal should preserve the position of all characters including whitespaces.

inputFormat

The first line of input contains an integer \( N \) representing the number of strings. The following \( N \) lines each contain a single string \( s \), which may include spaces.

outputFormat

Output \( N \) lines, where the \( i^{th} \) line contains the reversed version of the \( i^{th} \) input string.

## sample
3
apple
banana
cherry
elppa

ananab yrrehc

</p>