#include <bits/stdc++.h>
using namespace std;
int c, w, h;
struct mat {
  int a[101][101];
};
int mod = 1e6 + 3;
mat mult(mat b, mat c) {
  mat ans;
  for (int i = 0; i <= w; i++) {
    for (int j = 0; j <= w; j++) {
      ans.a[i][j] = 0;
      for (int k = 0; k <= w; k++) {
        ans.a[i][j] =
            (ans.a[i][j] + (long long)b.a[i][k] * c.a[k][j] % mod) % mod;
      }
    }
  }
  return ans;
}
mat pow_mat(mat a, int b) {
  if (b == 1) {
    return a;
  }
  if (b % 2) {
    return mult(pow_mat(a, b - 1), a);
  }
  mat temp = pow_mat(a, b / 2);
  return mult(temp, temp);
}
int pow(int a, int b) {
  if (b == 0) {
    return 1;
  }
  if (b % 2) {
    return (long long)a * pow(a, b - 1) % mod;
  }
  int temp = pow(a, b / 2);
  return (long long)temp * temp % mod;
}
int main() {
  cin >> c >> w >> h;
  mat m1;
  for (int i = 0; i <= w; i++) {
    for (int j = 0; j <= w; j++) {
      if (i == 0) {
        m1.a[i][j] = pow(h, j);
      } else {
        m1.a[i][j] = (i == (j + 1));
      }
    }
  }
  mat m2;
  for (int i = 0; i <= w; i++) {
    for (int j = 0; j <= w; j++) {
      if (j == 0) {
        m2.a[i][j] = pow(h + 1, w - i);
      } else {
        m2.a[i][j] = 0;
      }
    }
  }
  if (c <= w) {
    cout << m2.a[w - c][0] << endl;
  } else {
    cout << mult(pow_mat(m1, c - w), m2).a[0][0] << endl;
  }
}
