#C11434. Reverse Strings

    ID: 40750 Type: Default 1000ms 256MiB

Reverse Strings

Reverse Strings

This problem requires you to reverse a list of strings. Given a list of n strings, you have to output a new list in which every string is reversed, while preserving the original order.

For example, if the input is hello and world, the output should be olleh and dlrow respectively.

The reversal operation for a string \(s\) can be described in \(\LaTeX\) as: \(s = s_1s_2\dots s_k \Rightarrow \text{reverse}(s) = s_k\dots s_2s_1\).

inputFormat

The input is given via stdin in the following format:

  1. The first line contains an integer n denoting the number of strings.
  2. The following n lines each contain one string. Note that the strings may include spaces.

outputFormat

Output the reversed version of each string on its own line via stdout. The order of the strings should remain the same as the input.

## sample
2
hello
world
olleh

dlrow

</p>