#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void upmax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void upmin(T& a, T b) {
  if (a > b) a = b;
}
const int maxn = 100007;
const int maxm = 200007;
const int mod = 1000003;
const int inf = 0x7fffffff;
typedef int arr[maxn];
typedef int adj[maxm];
inline int add(int a, int b) { return ((long long)a + b) % mod; }
inline int mul(int a, int b) { return ((long long)a * b) % mod; }
inline int dec(int a, int b) { return add(a, mod - b % mod); }
inline int Pow(int a, int b) {
  int t = 1;
  while (b) {
    if (b & 1) t = mul(t, a);
    a = mul(a, a), b >>= 1;
  }
  return t;
}
template <typename Type>
inline Type RD() {
  char c = getchar();
  Type x = 0, flag = 1;
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    flag = -1;
  else
    x = c - '0';
  while (isdigit(c = getchar())) x = x * 10 + c - '0';
  return x * flag;
}
inline char rdch() {
  char c = getchar();
  while (!isalpha(c)) c = getchar();
  return c;
}
int c, h, w;
struct Mat {
  int n, m;
  int a[102][102];
  inline void clear() {
    memset(a, 0, sizeof a);
    n = m = 0;
  }
  inline void operator*=(Mat& x) {
    static Mat t;
    t.clear();
    t.n = n, t.m = x.m;
    for (int i = 0, _ = t.n; i <= _; i++)
      for (int j = 0, _ = t.m; j <= _; j++) {
        t.a[i][j] = 0;
        for (int k = 0, _ = x.n; k <= _; k++)
          t.a[i][j] = add(t.a[i][j], mul(a[i][k], x.a[k][j]));
      }
    (*this) = t;
  }
} A, I, F;
void input() {
  c = RD<int>(), w = RD<int>(), h = RD<int>();
  A.n = w, A.m = w;
  for (int i = 0, _ = w; i <= _; i++) A.a[i][0] = 1;
  for (int i = 1, _ = w; i <= _; i++) A.a[i - 1][i] = h;
}
inline void Pow(int n) {
  I.n = I.m = w;
  for (int i = 0, _ = w; i <= _; i++) I.a[i][i] = 1;
  while (n) {
    if (n & 1) I *= A;
    A *= A, n >>= 1;
  }
}
void solve() {
  F.n = 0, F.m = w;
  F.a[0][0] = 1;
  Pow(c);
  F *= I;
  int ans = 0;
  for (int i = 0, _ = w; i <= _; i++) ans = add(ans, F.a[0][i]);
  printf("%d\n", ans);
}
int main() {
  input();
  solve();
  return 0;
}
