E. Avoiding TLE!
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

After solving a lot of competitive programming problems, Tortles and Keys are tired of seeing TLE (or Time Limit Exceeded) verdicts! The two of them were recently sent a string $$$s$$$ by their friends consisting solely of a combination of letters $$$\mathrm{t}$$$, $$$\mathrm{u}$$$, $$$\mathrm{r}$$$, $$$\mathrm{l}$$$, and $$$\mathrm{e}$$$. They were challenged to write a program to see if it is possible to remove all the characters in the string. They are allowed to erase all the characters in a substring with "$$$\mathrm{tle}$$$" as a subsequence if the first and the last characters of the substring are equal to $$$\mathrm{t}$$$ and $$$\mathrm{e}$$$ respectively. That is, the two of them are allowed to erase a substring $$$s_l, s_{l + 1}, \ldots, s_r$$$ if and only if $$$s_l = $$$ $$$\mathrm{t}$$$, $$$s_r = $$$ $$$\mathrm{e}$$$, and there exists an index $$$i$$$ where $$$i \in [l + 1, r - 1]$$$ and $$$s_i = $$$ $$$\mathrm{l}$$$. To make it a bit harder, every time the two of them erase any substring, the entire remaining string reverses itself! Sadly, when attempting to solve this problem, Tortles and Keys' program TLEd. Please help them solve this problem!

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 2 \cdot 10^5$$$). The description of the test cases follows.

The first and only line of each test case contains a string $$$s$$$ of length $$$|s|$$$ ($$$1 \le |s| \le 2 \cdot 10^5$$$).

It is guaranteed that the sum of $$$|s|$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.

Output

Output $$$t$$$ lines, with each line being YES if it's possible to erase the entire string or NO if it is impossible.

Example
Input
4
turtle
euttutrlelet
eltrut
tleelt
Output
YES
YES
NO
YES