This is the easy version of the problem. The only difference between the two versions is the constraint on
. Given a string

of length

consisting of lowercase letters only, please calculate the number of 4-tuples
)
satisfying following conditions:
-
-
-
-
is lexicographically greater than
Here,

represents a substring of

which start from the

-th character and end at

-th character(inclusive).
String

is lexicographically less than string

, if either

is a prefix of

(and

), or there exists such
))
, that

, and for any
%2C%20x_j%20%3D%20y_j)
. Here

denotes the length of the string

.
As the answer may be too big, please output the answer module

.