Hamed has recently found a string *t* and suddenly became quite fond of it. He spent several days trying to find all occurrences of *t* in other strings he had. Finally he became tired and started thinking about the following problem. Given a string *s* how many ways are there to extract *k* ≥ 1 non-overlapping substrings from it such that each of them contains string *t* as a substring? More formally, you need to calculate the number of ways to choose two sequences *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*k*</sub> and *b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*k*</sub> satisfying the following requirements:
 -  *k* ≥ 1 -  <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/9787d50d9b7a3b6baffe4cb496df2248b003b17a.png" style="max-width: 100.0%;max-height: 100.0%;"/> -  <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/092ce460b67857d1ad157982f2234fb864faae89.png" style="max-width: 100.0%;max-height: 100.0%;"/> -  <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/c25caac60742ab6bf606b781e3f62be37a796eeb.png" style="max-width: 100.0%;max-height: 100.0%;"/> -  <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/99ce7829f1cda3a108cb995b136005e31e6f5582.png" style="max-width: 100.0%;max-height: 100.0%;"/>  *t* is a substring of string *s*<sub class="lower-index">*a*<sub class="lower-index">*i*</sub></sub>*s*<sub class="lower-index">*a*<sub class="lower-index">*i*</sub> + 1</sub>... *s*<sub class="lower-index">*b*<sub class="lower-index">*i*</sub></sub> (string *s* is considered as 1-indexed). 
As the number of ways can be rather large print it modulo 10<sup class="upper-index">9</sup> + 7.
Input consists of two lines containing strings *s* and *t* (1 ≤ |*s*|, |*t*| ≤ 10<sup class="upper-index">5</sup>). Each string consists of lowercase Latin letters.
s, t = input(), input()
n, m = len(t), len(s) + 1
h = t + ' ' + s

d = 1000000007
f = [0] * m
s = [1] * m

i = k = 0
p = [-1] + [0] * len(h)
for j in range(1, n + m):
    while i + 1 and h[i] != h[j]: i = p[i]
    i += 1
    p[j + 1] = i

    if j > n:
        j -= n
        if i == n: k = j
        if k: f[j] = f[j - 1] + s[k - n]
        s[j] += s[j - 1] + f[j]

print(f[-1] % d)