45.58%

Given a string of length N, print a pattern of strings with first line being the given string of length n and keep priting in new line the strings in decreasing order of length till you print the single first character of the given string.

**Input:** First line of the input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consist of only one line which contains a string of length N.

**Output: **Corresponding to each test case, pattern is printed in a new line.

**Constraints:**

1 <=T<= 30

N= 5

**Example:**

**Input:**

2

Geeks

th%ik

**Output:**

Geeks

Geek

Gee

Ge

G

th%ik

th%i

th%

th

t

Ibrahim Nash | 103 |

Stark_Maverick | 77 |

Eduardo Feo | 66 |

Rohit Sharma 16 | 65 |

Micky_Kt | 62 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

Ibrahim Nash | 343 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2030 |

Jasleen Kaur 2 | 2012 |

Quandray | 1969 |