1034: Text Pattern Generation

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:95 Solved:28

Description

Write a C program to print a right triangle in one of the four orientations. The triangle is formed by stacking designated character specified by input from keyboard. The edge length (L<=50) is also acquired from keyboard. For example when input is 


1 4a 


where 1 is the mode, 4 is the edge length and a is the designated character, then the output is 


aaaa
baaa
bbaa
bbba

Input: 
2 4a

Output:

aaaa
aaa
aa
a

Input: 
3 4a

Output:

a
aa
aaa
aaaa

Input: 
4 4a

Output:

bbba
bbaa
baaa
aaaa

Notice that in the output above, 'b' stands for 'a space character'. 

Input

1 4a 

Output

aaaa

 aaa

  aa

   a

Sample Input Copy

3 3b 

Sample Output Copy

b
bb
bbb