시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 512 MB 80 55 47 69.118%

문제

Given a list of space separated words, reverse the order of the words. Each line of text contains L letters and W words. A line will only consist of letters and space characters. There will be exactly one space character between each pair of consecutive words.

입력

The first line of input gives the number of cases, N.
N test cases follow. For each test case there will a line of letters and space characters indicating a list of space separated words. Spaces will not appear at the start or end of a line.

Limits

  • N = 100
  • 1 ≤ L ≤ 1000

출력

For each test case, output one line containing "Case #x: " followed by the list of words in reverse order.

예제 입력 1

3
this is a test
foobar
all your base

예제 출력 1

Case #1: test a is this
Case #2: foobar
Case #3: base your all

채점

  • 예제는 채점하지 않는다.