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.InputStreamReader;
import java.io.IOException;
//import java.util.Arrays;
import java.util.StringTokenizer;

public class TheMathsLecture {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        
//        int kk = 2;
//        int[] freq = new int[kk];
//        for (int i = 10000; i < 100000; i++) {
////            int d1 = i / 10;
////            int d2 = i / 100;
////            int d3 = i / 1000;
////            int d4 = i / 10000;
//          int d1 = i % 10;
//          int d2 = 10 * ((i / 10) % 10) + d1;
//          int d3 = 100 * ((i / 100) % 10) + d2;
//          int d4 = 1000 * ((i / 1000) % 10) + d3;
////            System.out.format("i = %d, d4 = %d, d3 = %d, d2 = %d, d1 = %d\n", i, d4, d3, d2, d1);
////            boolean valid = validMod(d1, kk) || validMod(d2, kk) || validMod(d3, kk) || validMod(d4, kk);
////            boolean badValid = badValidMod(d1, kk) || badValidMod(d2, kk) || badValidMod(d3, kk) || badValidMod(d4, kk);
////            if (badValid && !valid) {
////                System.out.println(i);
////            }
//          if (validMod(d1, kk) || validMod(d2, kk) || validMod(d3, kk) || validMod(d4, kk)) {
//              freq[0]++;
//          } else {
//              freq[i % kk]++;
//          }
//        }
//        System.out.println(Arrays.toString(freq));
        
        int N = sc.nextInt();
        int K = sc.nextInt();
        int M = sc.nextInt();

        long[] modArrK = new long[N];
        long[] modArrM = new long[N];
        modArrK[0] = 1 % K;
        modArrM[0] = 1 % M;
        for (int i = 1; i < N; i++) {
            modArrK[i] = (10 * modArrK[i - 1]) % K;
            modArrM[i] = (10 * modArrM[i - 1]) % M;
        }
        
        long cnt = 0;
        long[] dp = new long[K];
        boolean zeros = true;
        dp[0] = 1;
        for (int i = 0; i < N; i++) {
            dp[0] = zeros ? 1 : 0;
            long[] next = new long[K];
            int start = (i == N - 1) ? 1 : 0;
            for (int d = start; d <= 9; d++) {
                int init = (d == 0) ? 0 : 0;
                for (int j = init; j < K; j++) {
                    if (d == 0 && j == 0) {
//                      System.out.println("PASS");
                        if (zeros && modArrK[i + 1] == 0) {
                            next[0]++;
                            zeros = false;
//                          System.out.println("HERE!");
                        }
                    } else {
                        long newVal = (j + d * modArrK[i]) % K;
                        int newIdx = (int)newVal;
                        next[newIdx] = (next[newIdx] + dp[j]) % M;
                    }
                }
            }
            long mult = (i < N - 1) ? ((9 * modArrM[N - i - 2]) % M) : 1;
            cnt = (cnt + mult * next[0]) % M;
//          System.out.format("i = %d, cnt = %d, next = %s\n", i, cnt, Arrays.toString(next));
            next[0] = 0;
            dp = next;
        }
        System.out.println(cnt);
    }
    
    public static boolean validMod(int d, int m) {
        return (d > 0 && d % m == 0);
    }
    
    public static boolean badValidMod(int d, int m) {
        return (d % m == 0);
    }

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        
        int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            String str = "";
            try { str = br.readLine(); }
            catch (IOException e) { e.printStackTrace(); }
            return str;
        }
    }
}