Reverse of sequences P67268


Statement
 

pdf   zip

thehtml

Write a program that reads sequences of integer numbers, and prints each one reversing the order of its elements.

Input

Input consists of several sequences. Each sequence consists of a natural number n, followed by n integer numbers.

Output

Print each sequence in reverse order in a line.

Public test cases
  • Input

    6   10 11 12 15 14 13
    0
    2   22 21
    

    Output

    13 14 15 12 11 10
    
    21 22
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C C++ Java Python
    User solutions
    C C++ Java Python