Emag Eman

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

August and David are playing a name game. In this game, they are trying to say names backwards as fast as possible. Derek wants to join but he hates losing, so help him create a program that outputs names backwards! Given N names, output them backwards each on their own line.

Input Specification

The first line of input with contain integer N, the number of names to follow. The following N lines will contain one string, the name to be reversed.

Output Specification

For each name, output the name with its letters reversed.

Sample Input

4
Derek
August
David
Phil-Nic

Sample Output

kereD
tsuguA
divaD
ciN-lihP

Comments

There are no comments at the moment.