logo AlgoBeat OnlineJudge
登录 注册

#102295. [BZOJ 2295] 【POJ Challenge】我爱你啊

内存限制:128 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: 匿名

题目描述

ftiasch 是个十分受女生欢迎的同学,所以她总是收到许多情书。虽然她十分有魅力,然而她却是个低调的人。因此她从来不会告诉别人她到底收到了多少情书。

ftiasch 的好朋友 1tthinking 想知道她到底收到了多少情书。1tthinking 知道,ftiasch 每次收到一封情书,就会在日记最后写下一个包含 luvletter 子序列的串。比如现在 ftiasch 的日记是 alduddvdletterflusvletetedr,那么 ftiasch 可能收到了 封情书。

现在给出一些 ftiasch 的日记,问对于每篇日记,ftiasch 最多可能受到多少的情书。

输入格式

第一行一个整数 表示数据组数。

接下来 行,每行一个串表示一篇日记 ,保证只包含小写字母以及空格。

输出格式

行,每行一个整数表示对应询问的答案。

样例

样例输入 #1

5
t
llllluvletterrr
luvletterlauavalaeatataearaluvletter
is wzk a famous boy yes buz he always receives a lot of luv letters
my heart beats her waves at the shore of the world and writes upon it her signature in tears with the words i love thee

样例输出 #1

0
1
3
1
0

数据范围与提示

对于 的数据,