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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.concurrent.LinkedBlockingDeque;

import javax.swing.border.Border;

public class a {

	public static long mod = (long) Math.pow(10, 9) + 7;

	private static class node implements Comparable<node> {
		long num;
		int k;

		node(long m, int k) {
			num = m;
			this.k = k;

		}

		@Override
		public int compareTo(node o) {
			if (o.num < num)
				return 1;
			else if (o.num > num)
				return -1;
			else if (o.k < k)
				return 1;
			else if (o.k > k)
				return -1;
			return 0;
		}

	}

	public static class point implements Comparable<point> {
		long x;
		long y;
		long b;

		point(long x, long y, long b) {
			this.x = x;
			this.y = y;
			this.b = b;
		}

		@Override
		public int compareTo(point o) {
			if (k == 0)
				return (int) (o.x - x);
			else
				return (int) (y - o.y);

		}
	}

	public static int ch(long y) {
		int r = Long.bitCount(y);
		return r;
	}

	public static long gcd(long x, long y) {
		if (y == 0)
			return x;

		return gcd(y, x % y);
	}

	public static boolean ch[] = new boolean[10000005];
	public static ArrayList<Integer> prime = new ArrayList();

	// public static Queue<Integer> pp;

	public static void sieve(int k) {
		ch[0] = ch[1] = true;

		for (int i = 2; i <= k; i++) {
			if (!ch[i]) {
				prime.add(i);
				// pp.add(i);
				for (long j = (long) i * (long) i; j <= k; j += i) {
					ch[(int) j] = true;
				}
			}
		}

	}

	public static long pw(int x, int power, int mod) {
		if (power == 1)
			return x % mod;
		else if (power % 2 == 0)
			return pw((x % mod * x % mod) % mod, power / 2, mod);
		else
			return (pw(x, power - 1, mod) % mod * x % mod) % mod;

	}

	public static String addToString(String a, int index, char b) {
		String ans = "";
		for (int i = 0; i < a.length(); i++) {
			if (i == index) {
				ans += b;
				index = -1;
				i--;
				continue;
			}
			ans += a.charAt(i);
		}
		return ans;
	}

	public static int bit[];

	public static void add(int idx, int cost) {
		while (idx < bit.length) {
			bit[idx] += cost;
			idx += (idx & -idx);
		}

	}

	public static int get(int idx) {
		int res = 0;
		while (idx > 0) {
			res += bit[idx];
			idx -= (idx & -idx);
		}
		return res;
	}

	public static int n;
	public static int k;
	public static int m;

	public static long ans = 0;
	public static long pre[];
	public static int pre2[];

	public static void ss() {
		pre[0] = 1 % m;
		pre[1] = 9 % m;

		for (int i = 2; i <= 1004; i++) {
			pre[i] = (pre[i - 1] % m * 10 % m) % m;
		}

		pre2[0] = 1;
		pre2[1] = 10 % k;

		for (int i = 2; i < 1004; i++) {
			pre2[i] = (pre2[i - 1] % k * 10 % k) % k;
		}
	}

	public static long dp[][][];

	public static long solve(int i, int j, int flag) {
		if (j == 0 && i > 0 && flag == 1) {
			return pre[n - i] % m;
		} else if (i == n)
			return 0;

		if (dp[i][j][flag] != -1)
			return dp[i][j][flag] % m;

		long a = 0;
		for (int t = 0; t < 10; t++) {
			if (i == n - 1 && t == 0)
				continue;
			int y = (j % k + pre2[i] % k * t % k) % k;
		//	System.out.println(i + " " + y + " " + t);
			if (t != 0)
				a += solve(i + 1, y, 1);
			else
				a += solve(i + 1, y, flag);
		}

		return dp[i][j][flag] = a % m;

	}

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader in = new BufferedReader(new FileReader(
		// "corporate_gifting.txt"));
		StringBuilder qq = new StringBuilder();
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		// PrintWriter out = new PrintWriter(new FileWriter("out.txt"));

		String y[] = in.readLine().split(" ");
		n = Integer.parseInt(y[0]);
		k = Integer.parseInt(y[1]);
		m = Integer.parseInt(y[2]);

		dp = new long[n][k][2];
		pre = new long[1000 + 5];
		pre2 = new int[1000 + 5];
		ss();
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < k; j++) {
				dp[i][j][0]=dp[i][j][1]=-1;
			}
			
		}
		System.out.println(solve(0, 0,0) % m);

		out.close();

	}
}
