시간 제한메모리 제한제출정답맞힌 사람정답 비율
20 초 (추가 시간 없음) 1024 MB0000.000%

문제

It is the eve of Saturnalia in the Roman Empire, and Caterina is preparing the stables for the next day's chariot race. Part of her job is to write instructions and notes, print them on her printer (she's ahead of her time), and put them on the stable walls. That's simple, but because Saturnalia is an important festival, she wants to make them beautiful. Caterina needs a computer program that reads a message and outputs it back, decorated with a box. The program needs to be able to handle many messages at once. Can you help her?

입력

The first line of the input gives the number of test cases, TT lines follow. Each line contains a text message.

출력

For each test case, output four lines. The first one should contain "Case #x:", where x is the test case number (starting from 1). The next 3 lines should contain the original message surrounded by a box of '+', '-', and '|' characters, with a space character added on each side of the message. See examples below for the exact formatting requirements. Pay special attention to the spaces.

Test Set 1 (15점)

  • 1 ≤ T ≤ 100.
  • Each input line will contain between 1 and 70 characters.
  • Each character will either be an English letter, a space, or one of the following punctuation characters: ,?!'. (comma, question mark, exclamation point, apostrophe, or period).

예제 입력 1

5
Merry Saturnalia, Giovanni!
Equus, you're the best!
Caballus, you try really hard!
   
w

예제 출력 1

Case #1:
+-----------------------------+
| Merry Saturnalia, Giovanni! |
+-----------------------------+
Case #2:
+-------------------------+
| Equus, you're the best! |
+-------------------------+
Case #3:
+--------------------------------+
| Caballus, you try really hard! |
+--------------------------------+
Case #4:
+-----+
|     |
+-----+
Case #5:
+---+
| w |
+---+

힌트

Note that the input for Case #4 is a line with 3 space characters on it, so the output is a box with five space characters inside.

채점 및 기타 정보

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