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.PrintWriter;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

    private static StreamTokenizer in;
    private static Scanner ins;
    private static PrintWriter out;

    public static void main(String[] args) {
        try {
            in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
            ins = new Scanner(System.in);
            out = new PrintWriter(System.out);
            try {
                if (System.getProperty("xDx") != null) {
                    in = new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));
                    ins = new Scanner(new FileReader("input.txt"));
                    out = new PrintWriter(new FileWriter("output.txt"));
                }
            } catch (Exception e) {
                in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
                ins = new Scanner(System.in);
                out = new PrintWriter(System.out);
            }
            new Main().run();
            out.close();
        } catch (IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
    private static final int CHANGED = 1;
    private static final int NOT_CHANGED = 0;
    private int n, k, m;
    private int[] pow10k;
    private long[] pow10m;
    private long[][][] dp;

    private void run() throws IOException {
        n = nextInt();
        k = nextInt();
        m = nextInt();
        dp = new long[n + 1][k][2];

        for (int i = 0; i < n + 1; ++i) {
            for (int j = 0; j < k; ++j) {
                for (int l = 0; l < 2; ++l) {
                    dp[i][j][l] = -1;
                }
            }
        }

        pow10k = new int[n];
        pow10k[0] = 1 % k;
        pow10m = new long[n];
        pow10m[0] = 1 % m;
        for (int i = 1; i < n; ++i) {
            pow10k[i] = (pow10k[i - 1] * 10) % k;
            pow10m[i] = (pow10m[i - 1] * 10L) % m;
        }
        
        out.print(func(0, 0, NOT_CHANGED));
    }

    private long func(int sufLen, int mod, int changed) {
        if (dp[sufLen][mod][changed] != -1) {
            return dp[sufLen][mod][changed];
        }

        if (mod == 0 && changed == CHANGED) {
            return dp[sufLen][mod][changed] = sufLen == n ? 1 : (9L * pow10m[n - 1 - sufLen]) % m;
        }

        if (sufLen == n) {
            return dp[sufLen][mod][changed] = 0;
        }

        dp[sufLen][mod][changed] = 0;
        for (int i = 0; i < 10; ++i) {
            dp[sufLen][mod][changed] += func(
                    sufLen + 1, 
                    (mod + i * pow10k[sufLen]) % k, 
                    i == 0 ? NOT_CHANGED : CHANGED
            );
            dp[sufLen][mod][changed] %= m;
        }

        return dp[sufLen][mod][changed];
    }

    private class Instrument implements Comparable<Instrument> {

        public int id;
        public int days;

        public Instrument(int id, int days) {
            this.id = id;
            this.days = days;
        }

        @Override
        public int compareTo(Instrument x) {
            return Integer.compare(days, x.days);
        }

    }

    private int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    private long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }

    private String nextString() throws IOException {
        in.nextToken();
        return in.sval;
    }

}
