#include <bits/stdc++.h>
using namespace std;
const int N = 105, MOD = 1e6 + 3;
int n, w, h, f[N], a[N][N], r[N][N];
int main() {
  scanf("%d%d%d", &n, &w, &h), ++n, ++w;
  f[1] = a[1][1] = 1;
  for (int i(2), b_(w); i <= b_; ++i) a[1][i] = (1LL * a[1][i - 1] * h) % MOD;
  for (int i(2), b_(w); i <= b_; ++i) a[i][i - 1] = 1;
  while (n) {
    if (n & 1) {
      for (int i(1), b_(w); i <= b_; ++i)
        for (int j(1), b_(w); j <= b_; ++j)
          r[i][0] = (r[i][0] + (1LL * f[j] * a[i][j] % MOD)) % MOD;
      for (int i(1), b_(w); i <= b_; ++i) f[i] = r[i][0], r[i][0] = 0;
    }
    n >>= 1;
    for (int i(1), b_(w); i <= b_; ++i)
      for (int j(1), b_(w); j <= b_; ++j)
        for (int k(1), b_(w); k <= b_; ++k)
          r[i][j] = (r[i][j] + (1LL * a[i][k] * a[k][j] % MOD)) % MOD;
    for (int i(1), b_(w); i <= b_; ++i)
      for (int j(1), b_(w); j <= b_; ++j) a[i][j] = r[i][j], r[i][j] = 0;
  }
  printf("%d", f[1]);
  return 0;
}
