#Q226. 「一本通 6.5 练习 2」GT 考试

「一本通 6.5 练习 2」GT 考试

Description

Original source: HNOI 2008

Ashen is preparing to register for the GT exam. The admission ticket number is an nn-digit number X1X2Xn(0Xi9)X_1X_2\cdots X_n(0\le X_i\le 9). He does not want any unlucky digits to appear on his ticket number.

His unlucky number is an mm-digit number A1A2Am(0Ai9)A_1A_2\cdots A_m(0\le A_i\le 9). The ticket number is considered unlucky if it contains any contiguous subsequence exactly equal to A1A2AmA_1A_2\cdots A_m. Note that A1A_1 and X1X_1 can be 00.

Input Format

The first line contains three integers n,m,Kn,m,K. The next line contains the mm-digit unlucky number.

Output Format

Ashen wants to know how many ticket numbers do not contain the unlucky number. Output the result modulo KK.

Sample 1

4 3 100
111

81

Data Range and Hint

For all data, 1n109,1m20,2K10001\le n\le 10^9,1\le m\le 20,2\le K\le 1000.