Given a string of a constant length, print a triangle out of it. The triangle should start with the first character of the string and keeps growing downwards by adding one character from the string.
The spaces on the left side of the triangle should be replaced with dot character.
First line of the input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line contaning a string of length N.
Output: Corresponding to each test case, a pattern of triangle is printed in N lines.
1 <=T<= 30
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.