SDE Path

Reverse the Order of Words

Easy

Reverse the Order of Words

Print the words of a line in reverse order.

Input format

A single line S of words separated by single spaces.

Output format

Print the words of S in reverse order, separated by single spaces.

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
the sky is blue
Expected output
blue is sky the
Example 2
Input
hello world
Expected output
world hello