Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.

First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x > 0 exist such that:

  * Decimal representation of x (without leading zeroes) consists of exactly n digits; 
  * There exists some integer y > 0 such that: 
    * <image>; 
    * decimal representation of y is a suffix of decimal representation of x. 



As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.

Can you help Amr escape this embarrassing situation?

Input

Input consists of three integers n, k, m (1 ≤ n ≤ 1000, 1 ≤ k ≤ 100, 1 ≤ m ≤ 109).

Output

Print the required number modulo m.

Examples

Input

1 2 1000


Output

4

Input

2 2 1000


Output

45

Input

5 3 1103


Output

590

Note

A suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;



public final class CF_MathLecture_v2 {

	void log(int[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(long[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}
	void log(Object[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(Object o){
		logWln(o+"\n");
	}

	void logWln(Object o){
		//System.out.print(o);
		outputWln(o);

	}
	void info(Object o){
		System.out.println(o);
		//output(o);
	}

	void output(Object o){

		outputWln(""+o+"\n");

	}

	void outputWln(Object o){
		// System.out.print(o);

		try {
			out.write(""+ o);
		} catch (Exception e) {

		}
	}


	String next(){
		while (st== null|| !st.hasMoreTokens()) {
			try {
				st=new StringTokenizer(in.readLine());
			} catch (Exception e) {
			}
		}
		return st.nextToken();
	}

	String nextLine(){
		try {
			return in.readLine();
		} catch (Exception e) {
		}
		return null;
	}

	int nextInt(){
		return Integer.parseInt(next());
	}


	long nextLong(){
		return Long.parseLong(next());


	}


	void solve(){
		long[][] all=new long[N][K];
		long[][] sall=new long[N][K];
		long[] selected=new long[N];

		for (int u=1;u<10;u++){ 
			all[0][u%K]++;
			sall[0][u%K]++;
			if (u%K==0)
				selected[0]++;
		}
		//for (int y=0;y<K;y++)
			//log("all[0]["+y+"]:"+all[0][y]);
		//log("Starting with:"+selected[0]);
		int[] base=new int[N];
		base[0]=1;
		int b=1;
		for (int i=1;i<N;i++){
			b=b*10;
			if (b>=K)
				b%=K;
			base[i]=b;

			for (int u=1;u<10;u++){
				for (int y=1;y<K;y++){
					int x=b*u+y;
					if (x>=K)
						x%=K;
					if (x==0) {
						//log("u:"+u+" y:"+y);
						//log("Selecting u:"+u+" b:"+b+" y:"+y+" num:"+sall[i-1][y]);
						////log("*** x:"+x+" adding "+sall[i-1][y]);
						selected[i]+=sall[i-1][y];
						if (selected[i]>=MOD)
							selected[i]%=MOD;
					}
					else {
						//log("u:"+u+" y:"+y);
						
						//log("x:"+x+" adding "+sall[i-1][y]);
						all[i][x]+=sall[i-1][y];
						if (all[i][x]>=MOD)
							all[i][x]%=MOD;
					}
				}
				int x=b*u;
				if (x>=K)
					x%=K;
				if (x==0) {
					//log("Selecting u:"+u+" b:"+b);
					selected[i]++;
					if (selected[i]>=MOD)
						selected[i]%=MOD;
				}
				else {
					all[i][x]++;
					if (all[i][x]>=MOD)
						all[i][x]%=MOD;
				}
			}
			for (int y=1;y<K;y++) {
				sall[i][y]+=all[i][y]+sall[i-1][y];
				if (sall[i][y]>=MOD)
					sall[i][y]%=MOD;
			}
			//log("Res for i:"+i+" is :"+selected[i]);
		}

		//log("=======");
		long mult=1;
		long sum=0;
		for (int i=N-1;i>=0;i--){
			long x=mult*selected[i];
			//log("x:"+x);
			if (x>=MOD)
				x%=MOD;
			sum+=x;
			if (sum>=MOD)
				sum%=MOD;
			if (i==N-1)
				mult*=9;
			else
				mult*=10;
			if (mult>=MOD)
				mult%=MOD;
		}
		output(sum);
	}

	// Global vars
	StringTokenizer st;
	BufferedReader in;
	BufferedWriter out;
	int N,K;
	long MOD;





	void process() throws Exception {


		out = new BufferedWriter(new OutputStreamWriter(System.out));
		in=new BufferedReader(new InputStreamReader(System.in));

		N=nextInt();
		K=nextInt();
		MOD=nextInt();
		solve();



		try {
			out.close();
		}
		catch (Exception e){}


	}



	public static void main(String[] args) throws Exception {
		CF_MathLecture_v2 J=new CF_MathLecture_v2();

		J.process();


	}


}