You are given an array A of N integers. You have to perform the following operations on the array:
Input Format
Output Format
Print N lines containing k for every removal
Sample Input
5
4 7 18 16 14
Sample Output
4294967280
4294967266
4294967282
4294967292
4294967291
You are given a string s of length N.
Now, a good subsequence is one that can be represented in the form aibjck, where i >= 1, j >= 1 and k >= 1. For example , if i = 2, j = 1, k = 3, it represents the string aabccc. In short, a good subsequence is a subsequence that first consist of i a characters, followed by j b characters, followed by k c characters, where i≥ 1, j ≥ 1 and k ≥ 1.
You are required to find the number of good subsequences of String S. As the number of such subsequences could be rather large, print the answer Modulo 109+7.
Note: Two subsequences are considered different if the set of array indexes picked for the 2 subsequences are different.
Input Format:
The first and only line of input contains the S
Output Format :
Print the required answer on a single line.
Sample Input :
abcabc
Sample Output:
7