Mr. AK works in a door mat manufacturing company. One day, he designed a new door mat with the following specifications:
Mat size must be X. ( is an odd natural number, and is times .)
The design should have 'WELCOME' written in the center.
The design pattern should only use |, . and - characters
Solution::
n,m=map(int,input().split())
pattern = [('.|.'*(2*i + 1)).center(m, '-')
for i in range(n//2)]
print('\n'.join(pattern +
['WELCOME'.center(m, '-')]
+ pattern[::-1]))
0 Comments