#include <bits/stdc++.h>
using namespace std;
const int N = 105;
const int mod = 1e6 + 3;
struct Mat {
  long long mat[N][N];
  void init() { memset(mat, 0, sizeof(mat)); }
  void setE() {
    init();
    for (int i = 0; i < N; i++) mat[i][i] = 1;
  }
  Mat operator*(const Mat &a) const {
    Mat ret;
    ret.init();
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++)
        for (int k = 0; k < N; k++)
          ret.mat[i][k] =
              (ret.mat[i][k] + 1ll * mat[i][j] * a.mat[j][k] % mod) % mod;
    return ret;
  }
  void output() {
    cout << "Matrix" << endl;
    for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5; j++) printf("%d ", mat[i][j]);
      printf("\n");
    }
  }
} A, B;
Mat operator^(Mat a, long long b) {
  Mat ret;
  ret.setE();
  while (b) {
    if (b & 1) ret = ret * a;
    a = a * a;
    b >>= 1;
  }
  return ret;
}
long long fastmod(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return res;
}
int C, W, H;
void Mat_init() {
  B.init();
  for (int i = 0; i <= W; i++) B.mat[0][i] = fastmod(H, i);
  for (int i = 1; i <= W; i++) B.mat[i][i - 1] = 1;
}
int main() {
  cin >> C >> W >> H;
  Mat_init();
  A.init();
  for (int i = 0; i <= W; i++) A.mat[i][0] = fastmod(1 + H, W - i);
  if (C <= W)
    cout << A.mat[W - C][0] << endl;
  else {
    Mat ans = (B ^ 1ll * (C - W)) * A;
    cout << ans.mat[0][0] << endl;
  }
  return 0;
}
