#include <bits/stdc++.h>
using namespace std;
const long long M = 1e6 + 3;
const long long SZ = 1e2 + 1;
long long c, w, h;
long long add(long long a, long long b) {
  long long res = a + b;
  if (res >= M) return res - M;
  return res;
}
long long mult(long long a, long long b) {
  long long res = a;
  res *= b;
  if (res >= M) return res % M;
  return res;
}
struct matrix {
  long long arr[SZ][SZ];
  matrix() { reset(); }
  void reset() {
    for (long long i = 0; i < SZ; i++)
      for (long long j = 0; j < SZ; j++) arr[i][j] = 0;
  }
  void makeiden() {
    reset();
    for (long long i = 0; i < SZ; i++) {
      arr[i][i] = 1;
    }
  }
  matrix operator+(const matrix &o) const {
    matrix res;
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        res.arr[i][j] = add(arr[i][j], o.arr[i][j]);
      }
    }
    return res;
  }
  matrix operator*(const matrix &o) const {
    matrix res;
    for (long long i = 0; i < SZ; i++) {
      for (long long j = 0; j < SZ; j++) {
        res.arr[i][j] = 0;
        for (long long k = 0; k < SZ; k++) {
          res.arr[i][j] = add(res.arr[i][j], mult(arr[i][k], o.arr[k][j]));
        }
      }
    }
    return res;
  }
};
matrix power(matrix a, long long b) {
  matrix res;
  res.makeiden();
  while (b) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> c >> w >> h;
  long long hh = h;
  matrix A;
  A.reset();
  A.arr[0][0] = 1;
  for (long long i = 1; i <= w; i++) {
    A.arr[0][i] = hh;
    hh *= h;
    hh %= M;
    A.arr[i][i - 1] = 1;
  }
  A = power(A, c + 1);
  cout << A.arr[0][0];
}
