Reversing words (2) P99133


Statement
 

pdf   zip

html

Write a program that reads words, and prints them in reverse order, reversing also the order of the characters of each word.

Input

Input consists of a natural number n, followed by n words.

Output

Print the words in reverse order, one per line, and with the characters inside each word reversed.

Public test cases
  • Input

    3
    hello
    how_are_you?
    bye
    

    Output

    eyb
    ?uoy_era_woh
    olleh
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Salvador Roura
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Haskell Java Python