One day, a brilliant idea came to Colin's mind.
Given a string

with length

(indexed from

to

) consisting of lowercase letters.
Let

denotes the character of

with index

, e.g. let
abc then
a and
b.
Let
![S[l:r]](https://www.nowcoder.com/equation?tex=S%5Bl%3Ar%5D)
denotes the substring of

with index form

to

, e.g. let
abc then
bc .
Now we play a game on the string. You want to take as many turns successfully as you can.
In one turn, you should:
-
first choose two integers
satisfying
and
has at least two different characters (i.e. exist two different integers
satisfy
). If you cannot find such two integers
, you fail in this turn, and the game ends.
-
then choose an integer
, change all the characters
into
; then you take this turn successfully.
For example, let
abc and choose

, then after this turn,

becomes
acc .
Colin wants to ask you, at most how many turns can be successfully taken on string

?
Eva thought that's too easy for you, so she upgraded this problem to a counting problem. Let

denotes the answer to the above question for string

, you need to count that
among all strings with length
consisting of lowercase letters:
1. how many strings satisfy

?
2. how many strings satisfy

and

is finite?
3. how many strings satisfy

is infinite?