#include <bits/stdc++.h>
using namespace std;
long long dp[1010][105], po[1010], po2[1010];
long long qui(long long a, long long n, long long m) {
  long long ans = 1;
  while (n) {
    if (n & 1) ans = (ans * a) % m;
    n >>= 1;
    a = (a * a) % m;
  }
  return ans;
};
int main() {
  long long n, k, m;
  while (cin >> n >> k >> m) {
    po[0] = 1;
    for (int i = 1; i <= n; i++) po[i] = (po[i - 1] * 10) % m;
    po2[0] = 1;
    for (int i = 1; i <= n; i++) po2[i] = (po2[i - 1] * 10) % k;
    long long sum = 0;
    memset(dp, 0, sizeof(dp));
    for (int i = 1; i < 10; i++) dp[1][i % k]++;
    if (n >= 2) sum = (sum + dp[1][0] * 9 * po[n - 2]) % m;
    for (int i = 1; i < n - 1; i++) {
      for (int j = 1; j < k; j++)
        for (int x = 0; x < 10; x++)
          dp[i + 1][(j + x * po2[i]) % k] =
              (dp[i + 1][(j + x * po2[i]) % k] + dp[i][j]) % m;
      for (int x = 1; x < 10; x++)
        dp[i + 1][x * po2[i] % k] = (dp[i + 1][x * po2[i] % k] + 1) % m;
      sum = (sum + ((dp[i + 1][0] * 9) % m) * po[n - i - 2]) % m;
    }
    if (n >= 2) {
      for (int j = 1; j < k; j++)
        for (int x = 1; x < 10; x++)
          dp[n][(j + x * po2[n - 1]) % k] =
              (dp[n][(j + x * po2[n - 1]) % k] + dp[n - 1][j]) % m;
      for (int x = 1; x < 10; x++)
        dp[n][x * po2[n - 1] % k] = (dp[n][x * po2[n - 1] % k] + 1) % m;
    }
    sum = (sum + dp[n][0] % m) % m;
    cout << sum << endl;
  }
  return 0;
}
