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.
#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
void setmin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void setmax(T& a, T val) {
  if (a < val) a = val;
}
void addmod(long long& a, long long val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
void submod(long long& a, long long val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
long long inv(long long a, int p = MOD) { return fpow(a, p - 2, p); }
const int N = 1005, K = 105;
long long dp[N][K], pre[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k, m;
  cin >> n >> k >> m;
  long long ans = 0;
  pre[0] = 1;
  for (int i = 1; i <= n; i++) pre[i] = (pre[i - 1] * 10LL) % k;
  if (n == 1) {
    for (int i = 1; i <= 9; i++) {
      int p = i % k;
      dp[1][p] = (dp[1][p] + 1) % m;
    }
    ans = (ans + dp[1][0]) % m;
  } else {
    for (int i = 1; i <= 9; i++) {
      int p = i % k;
      dp[1][p] = (dp[1][p] + 1) % m;
    }
    ans = (ans + (9LL * fpow(10, n - 2, m)) % m * dp[1][0]) % m;
    for (int i = 2; i < n; i++) {
      long long u = pre[i - 1] % k;
      for (int j = 1; j < k; j++) {
        for (int l = 0; l <= 9; l++) {
          long long p = (l * u + j) % k;
          dp[i][p] = (dp[i][p] + dp[i - 1][j]) % m;
        }
      }
      for (int l = 1; l <= 9; l++) {
        long long p = (l * u) % k;
        dp[i][p] = (dp[i][p] + 1) % m;
      }
      ans = (ans + (9LL * fpow(10, n - 1 - i, m)) % m * dp[i][0]) % m;
    }
    long long u = pre[n - 1];
    for (int j = 1; j < k; j++) {
      for (int l = 1; l <= 9; l++) {
        long long p = (l * u + j) % k;
        dp[n][p] = (dp[n][p] + dp[n - 1][j]) % m;
      }
    }
    for (int l = 1; l <= 9; l++) {
      long long p = (l * u) % k;
      dp[n][p] = (dp[n][p] + 1) % m;
    }
    ans = (ans + dp[n][0]) % m;
  }
  cout << ans << "\n";
  return 0;
}
