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.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/*
 public class _507D {

 }

 */

public class _507D {
  public void solve() throws FileNotFoundException {
    InputStream inputStream = System.in;

    InputHelper inputHelper = new InputHelper(inputStream);

    PrintStream out = System.out;

    // actual solution

    int n = inputHelper.readInteger();
    int k = inputHelper.readInteger();
    int m = inputHelper.readInteger();


    long[][] mod = new long[n][10];

    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 10; j++) {
        long num = j % k;
        for (int l = 0; l < i; l++) {
          num *= 10;
          num %= k;
        }
        mod[i][j] = num;
      }
    }

    long[][][] dp = new long[n][k][2];

    for (int j = 1; j < 10; j++) {
      dp[0][j % k][1]++;
    }

    if (n == 1) {
      System.out.println(dp[0][0][1] % m);
      return;
    }

    long[] mul = new long[n];

    mul[n - 1] = 1;
    mul[n - 2] = 9;

    for (int i = n - 3; i >= 0; i--) {
      mul[i] = (mul[i + 1] * 10) % m;
    }

    long ans = 0;

    ans += (dp[0][0][1] * mul[0]) % m;
    ans %= m;

    dp[0][0][0]++;

    for (int i = 1; i < n; i++) {
      for (int j = 0; j < 10; j++) {
        for (int l = 1; l < k; l++) {
          dp[i][((int) mod[i][j] + l) % k][1] += dp[i - 1][l][1];
          dp[i][((int) mod[i][j] + l) % k][1] %= m;
        }
        for (int l = 1; l < k; l++) {
          dp[i][((int) mod[i][j] + l) % k][0] += dp[i - 1][l][0];
          dp[i][((int) mod[i][j] + l) % k][0] %= m;
        }
        if (j > 0)
          dp[i][(int) mod[i][j] % k][0]++;
      }
      ans += ((dp[i][0][1] + dp[i][0][0]) * mul[i]) % m;
      ans %= m;
      // for (int l = 1; l < k; l++) {
      // dp[i][l] += dp[i - 1][l];
      // dp[i][l] %= m;
      // }
      // dp[i][0]++;
    }

    System.out.println(ans);
    // BigInteger mb = new BigInteger(String.valueOf(m));
    //
    // String ns = "";
    //
    // long ans = 0;
    // for(int i = 1; i <= n; i++)
    // {
    // for(int j = 0; j < i; j++)
    // {
    // ns += "9";
    // }
    //
    // BigInteger nb = new BigInteger(ns);
    //
    // BigInteger nod = nb.divide(new BigInteger(String.valueOf(k)));
    //
    // ans += ((((9L * pow(10, n - i - 1, m)) % m) * nod.mod(mb).intValue()) % m);
    // }

    // System.out.println(ans);
    // end here
  }

  long help() {
    int ans = 0;
    for (int i = 10000; i <= 99999; i++) {
      if (isv(i))
        ans++;
    }

    return ans;
  }

  boolean isv(int num) {
    String nums = String.valueOf(num);

    for (int i = 0; i < nums.length(); i++) {
      String sub = nums.substring(i);

      Integer subn = Integer.valueOf(sub);

      if (subn % 3 == 0 && subn != 0) {
        return true;
      }
    }

    return false;
  }

  private long pow(int i, int j, int m) {

    if (j == 0)
      return 1;
    long ans = pow(i, j / 2, m);

    if (j % 2 == 1) {
      return (((ans * j) % m) * ans) % m;
    } else {
      return (ans * ans) % m;
    }
  }

  public static void main(String[] args) throws FileNotFoundException {
    (new _507D()).solve();
  }

  class InputHelper {
    StringTokenizer tokenizer = null;
    private BufferedReader bufferedReader;

    public InputHelper(InputStream inputStream) {
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      bufferedReader = new BufferedReader(inputStreamReader, 16384);
    }

    public String read() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String line = bufferedReader.readLine();
          if (line == null) {
            return null;
          }
          tokenizer = new StringTokenizer(line);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

      return tokenizer.nextToken();
    }

    public Integer readInteger() {
      return Integer.parseInt(read());
    }

    public Long readLong() {
      return Long.parseLong(read());
    }
  }
}
