#include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int MOD = 1e6 + 3;
int n, w, h, a[N][N], res[N][N], tmp[N][N];
void fill() {
  memset(a, 0, sizeof(a));
  for (int i = 0; i <= w; i++) a[0][i] = 1;
  for (int i = 1; i <= w; i++) a[i][i - 1] = h;
}
int product(int a, int b) { return (1ll * a * b) % MOD; }
int sum(int a, int b) { return (a + b) % MOD; }
int solve(int n) {
  for (int i = 0; i <= w; i++) {
    for (int j = 0; j <= w; j++)
      if (i == j)
        res[i][j] = 1;
      else
        res[i][j] = 0;
  }
  while (n) {
    if (n & 1) {
      for (int i = 0; i <= w; i++) {
        for (int j = 0; j <= w; j++) {
          tmp[i][j] = 0;
          for (int k = 0; k <= w; k++)
            tmp[i][j] = sum(tmp[i][j], product(res[i][k], a[k][j]));
        }
      }
      for (int i = 0; i <= w; i++)
        for (int j = 0; j <= w; j++) res[i][j] = tmp[i][j];
    }
    for (int i = 0; i <= w; i++) {
      for (int j = 0; j <= w; j++) {
        tmp[i][j] = 0;
        for (int k = 0; k <= w; k++)
          tmp[i][j] = sum(tmp[i][j], product(a[i][k], a[k][j]));
      }
    }
    for (int i = 0; i <= w; i++)
      for (int j = 0; j <= w; j++) a[i][j] = tmp[i][j];
    n /= 2;
  }
  int ans = 0;
  for (int i = 0; i <= w; i++) ans = sum(ans, res[i][0]);
  return ans;
}
int main() {
  cin >> n >> w >> h;
  fill();
  cout << solve(n);
  return 0;
}
