String contains characters of two disjoint alphabets А_1 and А_2. Two strings are considered equal if there is a one-to-one mapping of the alphabet А_2 to itself which, when applied to the first string, produces the second string.
Under this definition of string equality we say that for a given pattern there is its occurrence in a string, if there is a substring in a string equal to the pattern.
For a given string and a pattern count the number of occurrences of the pattern in the string.
The first line of the input file contains two integers N and M — the number of characters in the first and second alphabets, respectively (1 ≤ N, M < 52).
The following two lines contain characters from the alphabets A_1 and A_2. without spaces. Characters from the alphabets are Latin, lowercase or capitalized. The fourth line contains the string, and the fifth contains pattern.
The lengths of the string and pattern do not exceed 10^5.
The output file must contain a single integer — the number of times the pattern appears in the string.