Setting

Write a program that will reverse the letters in each of a sequence of words while preserving the order of the words themselves.

Input

The input file will consist of several lines of several words. Words are contiguous stretches of printable characters delimited by white space.

Output

The output will consist of the same lines and words as the input file. However, the letters within each word must be reversed.

Sample Input

I love you.
You love me.
We're a happy family.

Sample Output

I evol .uoy
uoY evol .em
er'eW a yppah .ylimaf

This challenge is provided by the ACM International Collegiate Programming Contest.

Upload Solution

Please log in to submit your solution.

Statistics

Difficulty (5 votes)
Average test runtime 0.25
Points (changes over time) 10
Tried by 43 users
Solved by 33 users

Global ranking

# Name Runtime Points worth
1 ,s/java/NaN/gi 0.14 17
2 Pascal 0.14 16
3 mascent 0.14 16
4 Irfan 0.14 16
5 Justin 0.15 16
6 Daniel 0.15 15
7 Ali 0.16 15
8 mad 0.17 14
9 JB 0.17 13
10 Chris Danger 0.20 11
11 Jan 0.21 11
12 Sven 0.21 11
13 Skillbo Boblin 0.24 10
14 Phatti McButterpants 0.24 9
15 Marek 0.24 9
16 maltesar 0.25 9
17 Finn-Lasse 0.26 9
18 Dark 0.26 9
19 Mac 0.28 8
20 Melf 0.28 8
21 Florian 0.29 8
22 VargK 0.29 8
23 Birger 0.29 8
24 Eren B. Yilmaz 0.31 7
25 Soeren 0.32 7
26 Nis 0.32 7
27 The Prof 0.34 7
28 Jan 0.36 6
29 Sk√łgland 0.37 6
30 Mo 0.37 6
31 Philip 0.38 6
32 IeM 0.39 6
33 Luca 0.39 6