Mr. Vincent works in a door mat manufacturing company. One day, he designed a new door mat with the following specifications.
- Mat size must be
N
xM
. (N
is an odd natural number, andM
is timesN
.) - The design should have "WELCOME" written in the center.
- The design pattern should only use
|,.
and-
characters.
Size: 7 x 21
---------.|.---------
------.|..|..|.------
---.|..|..|..|..|.---
-------WELCOME-------
---.|..|..|..|..|.---
------.|..|..|.------
---------.|.---------
Size: 11 x 33
---------------.|.---------------
------------.|..|..|.------------
---------.|..|..|..|..|.---------
------.|..|..|..|..|..|..|.------
---.|..|..|..|..|..|..|..|..|.---
-------------WELCOME-------------
---.|..|..|..|..|..|..|..|..|.---
------.|..|..|..|..|..|..|.------
---------.|..|..|..|..|.---------
------------.|..|..|.------------
---------------.|.---------------
A single line containing the space separated values of N
and M
.
5 < N
< 101
15 < M
< 303
Output the design pattern.
Sample Input
9 27
Sample Output
------------.|.------------
---------.|..|..|.---------
------.|..|..|..|..|.------
---.|..|..|..|..|..|..|.---
----------WELCOME----------
---.|..|..|..|..|..|..|.---
------.|..|..|..|..|.------
---------.|..|..|.---------
------------.|.------------
# Enter your code here. Read input from STDIN. Print output to STDOUT
user_input = input().split()
n,m = int(user_input[0]), int(user_input[1])
s = 1
for line in range(n+1):
if line < int(n/2):
print((".|."*s).center(m, "-"))
s += 2
elif line == round(n/2):
print("WELCOME".center(m, "-"))
elif line > int(n/2) and s > 1:
s -= 2
print((".|."*s).center(m, "-"))