You are given two strings, A and B, of lengths N and M, respectively, containing lowercase English letters. You are also given a parameter K. You take out K non-overlapping non-empty sub-strings from A and concatenate them in the order in which they appear in A to get a new string. Your task is to calculate the number of ways to make the new string and string B equal. Since the answer can be large, calculate it modulo 109+7.
Note that the two ways are different if at least one of the sub-strings is different at any position or the indices with which the sub-strings are made are different.
Input Format
Output Format
Print the number of ways to build the string B using exactly K non-overlapping non-empty substrings from A modulo 109+7.
Constraints
1≤N≤10001≤M≤2001≤K≤M
There are two ways to obtain the ‘B’ from ‘A’ using only one sub-string. They are at positions A[0:3]=[0,1,2,3] and A[4:7]=[4,5,6,7].