#PCBTAM0000013. Viền văn bản bằng ký tự (Text Border)
Viền văn bản bằng ký tự (Text Border)
Text Border
Version: Phuoc Hung OJ Extended
Problem Statement
Given a text string , construct a three-line frame using * characters:
- The top line contains asterisks.
- The middle line contains
*, then all of , then*. - The bottom line is identical to the top line.
Count spaces in the length and preserve every character of .
Input
One line contains , which may be empty.
Output
Print exactly three lines forming the frame, with no additional characters.
Subtasks
- Subtask 1 (100 points): Unicode characters.
Examples
Example 1
Input
Hi
Output
****
*Hi*
****
Explanation. Hi has length , so each border has stars and the middle is *Hi*.
Example 2
Input
Output
**
**
**
Explanation. The string is empty, so both borders and the middle line are **.
Example 3
Input
A B
Output
*****
*A B*
*****
Explanation. A B counts as three characters including the space, so the border uses five stars.