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.*;
import java.util.*;

public class D implements Runnable{
	public static void main (String[] args) {new Thread(null, new D(), "_cf", 1 << 28).start();}

	int n, k, m;
	int[] pows, pows2, dp[][];
	
	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("Go!");

		n = fs.nextInt();
		k = fs.nextInt();
		m = fs.nextInt();
		pows = new int[n];
		pows2 = new int[n];
		pows2[0] = 1 % k;
		for(int i = 1; i < n; i++) {
//			pows2[i] = (int)((10L * pows[i-1]) % k);
			pows2[i] = (10 * pows2[i-1]) % k;
		}
		pows[0] = 9 % m;
		for(int i = 1; i < n; i++) {
			pows[i] = (int)((10L * pows[i-1]) % m);
//			pows[i] = (pows[i-1]*10) % m;
		}
		dp = new int[2][k][n];
		for(int[][] d : dp)
			for(int[] dd : d)
				Arrays.fill(dd, -1);
		out.println(solve(0, 0, n-1));
		
		out.close();
	}
	
	int solve(int non, int mod, int pos) {
//		System.out.println(non + " " + mod + " " + pos);
		if(mod == 0 && non > 0) {
			if(pos < 0) return 1;
			return pows[pos];
		}
		if(pos < 0) return 0;
		int ret = dp[non][mod][pos];
		if(ret != -1) return ret;
		int res = 0;
		int st = pos == 0 ? 1 : 0;
		for(int i = st; i <= 9; i++) {
			int nnon = non, nmod = mod;
			if(i > 0) nnon = 1;
			if(pos == n - 1) nmod = i % k;
			else {
				nmod = (pows2[n-pos-1]*i) % k;
				nmod += mod; nmod %= k;
			}
			res = add(res, solve(nnon, nmod, pos-1));
		}
		
		return dp[non][mod][pos] = res;
	}
	
	int add(int a, int b) {
		a %= m;
		b %= m;
		long res = a;
		res += b; 
		res %= m;
		return (int)res;
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}