#jag2018summerday2h. [jag2018summer_day2_h]Prefix Suffix Free

[jag2018summer_day2_h]Prefix Suffix Free

Problem Statement

You are given a string SS consisting of lowercase English letters. Count the number of strings TT that satisfies all of the following conditions:

  • TT is a string of the same length as SS, consisting of lowercase English letters.
  • For all KK ( 1leqKleqS1 \\leq K \\leq |S| ), the string formed by the first KK letters of SS does not coincide with the string formed by the last KK letters of TT.

Since the answer can be very large, find the number modulo 109+710^9+7.

Constraints

  • 1leqSleq1061 \\leq |S| \\leq 10^6
  • SS consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

SS

Output

Print the number of strings that satisfy the condition, modulo 109+710^9+7.


Sample Input 1

aa

Sample Output 1

650

For example, T=T= zz and ab satisfy the condition, but ba or aa does not.


Sample Input 2

abc

Sample Output 2

16873

Sample Input 3

xrxbaxrxikxrxgvcpuwx

Sample Output 3

352084595