10 2 5
1 1 1 2 2 2 2 2 2 2
 10 2 5
1 1 1 1 1 1 2 2 2 2
 3 3 2
1 3 1
 8 8 7
7 2 8 6 8 5 3 8
 7 7 5
2 6 3 6 3 5 1
 5 5 1
5 2 5 1 2
 6 6 6
5 6 5 3 4 2
 5 5 2
2 3 2 2 4
 3 3 3
1 1 1
 111 78 54
24 13 49 22 52 38 38 63 21 10 9 56 60 47 11 78 23 52 55 12 72 33 17 14 33 59 21 32 20 73 1 60 27 64 23 74 36 49 69 14 29 37 19 61 52 33 26 27 10 11 34 25 62 47 36 12 63 45 31 71 78 1 6 26 36 65 56 46 19 28 77 64 56 8 77 38 3 33 63 77 40 7 22 13 60 14 57 43 51 10 30 21 7 67 32 11 12 9 72 24 27 67 25 63 6 67 69 37 26 19 26
 10 2 5
1 1 1 1 1 1 1 1 1 2
 6 6 1
4 5 6 3 5 3
 10 2 5
1 1 1 1 2 2 2 2 2 2
 8 8 3
8 8 2 7 8 2 3 5
 7 7 4
4 6 6 7 2 5 3
 10 2 5
2 2 2 2 2 2 2 2 2 2
 111 67 97
32 67 4 15 17 17 23 6 39 54 19 62 28 59 63 36 44 40 28 67 28 3 55 19 11 26 3 38 22 26 62 54 61 15 22 4 47 53 27 36 31 5 16 59 51 62 51 46 7 55 26 66 50 51 32 17 54 14 18 14 40 30 24 2 61 16 16 27 55 58 35 7 26 3 26 4 13 59 14 32 56 54 5 46 39 30 45 24 37 12 67 38 45 32 41 21 46 26 41 29 15 28 65 5 19 53 13 31 58 18 57
 6 6 2
4 4 2 4 2 3
 10 2 5
1 1 1 1 1 2 2 2 2 2
 10 2 5
1 1 1 1 1 1 1 1 2 2
 6 6 4
5 2 4 3 1 5
 10 2 5
1 1 2 2 2 2 2 2 2 2
 1 1 1
1
 8 8 5
7 5 6 8 2 8 3 4
 10 2 5
1 1 1 1 1 1 1 2 2 2
 111 101 52
54 69 33 81 8 90 48 21 96 35 44 75 68 34 101 82 93 94 86 76 33 91 5 70 22 84 70 71 62 81 50 83 51 43 95 46 19 53 101 34 51 40 6 17 69 60 73 89 65 75 59 68 62 49 89 23 63 83 86 68 62 39 1 18 3 75 44 57 9 24 67 81 83 45 93 66 79 71 43 49 17 2 33 38 98 71 71 21 56 16 31 2 75 61 64 38 69 80 81 12 68 95 26 9 69 82 41 35 75 7 71
 3 3 3
3 3 1
 4 4 2
2 4 4 3
 10 2 5
1 2 2 2 2 2 2 2 2 2
 4 4 4
4 4 4 4
 3 3 2
1 2 3
 2 1 2
1 1
 5 5 3
3 4 1 5 5
 7 7 1
2 6 5 6 2 3 3
 111 9 57
9 9 2 6 8 6 5 8 9 7 3 9 1 2 6 6 5 3 1 1 6 1 8 4 3 9 8 6 8 1 9 8 5 8 6 9 4 5 7 3 1 6 4 3 2 5 7 3 1 7 9 1 7 1 3 5 9 5 6 2 2 7 9 7 1 5 5 5 5 2 6 5 7 3 8 9 7 3 6 5 1 9 2 9 9 8 8 7 9 1 6 2 4 5 7 4 8 9 9 2 7 7 6 9 8 2 1 3 3 1 5
 4 4 1
2 4 1 4
 2 1 1
1 1
 111 16 58
15 6 4 7 7 10 16 2 3 1 4 8 10 1 2 11 6 6 14 16 6 16 1 2 13 2 7 13 1 4 1 4 12 2 4 11 15 12 9 13 10 4 11 7 5 3 12 11 11 3 16 15 9 6 15 11 4 14 8 15 16 3 9 10 9 1 8 4 14 7 13 5 1 8 5 11 8 14 1 8 15 2 5 2 4 5 9 2 10 11 11 5 7 11 11 14 5 16 14 2 4 11 12 10 7 14 2 5 3 2 1
 2 2 2
1 1

4
 5
 2
 6
 12
 3
 1
 4
 1
 648
 2
 4
 5
 19
 25
 1
 214
 5
 6
 3
 11
 3
 1
 41
 4
 881
 1
 4
 2
 1
 3
 1
 7
 4
 446
 3
 1
 552
 1

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
template<class T> using PQ = priority_queue<T>;
template<class T> using PQG = priority_queue<T, vector<T>, greater<T> >;
const int INF = 0xccccccc;
const ll LINF = 0xcccccccccccccccLL;
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {return a < b && (a = b, true);}
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {return a > b && (a = b, true);}
template<typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) { return is >> p.first >> p.second;}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) { return os << p.first << ' ' << p.second;}

namespace fft {

constexpr unsigned int modulo1 = 998244353;
constexpr unsigned int modulo2 = 1000000007;
constexpr long double PI = acos(-1);

struct modint_base {};
template<class C> using is_modint = is_base_of<modint_base, C>;
template<class C> using is_modint_t = enable_if_t<is_modint<C>::value>;
template<class C> using is_complex = typename conditional<is_same<C, complex<double>>::value || is_same<C, complex<long double>>::value, true_type, false_type>::type;

//begin NTT
template<int m>
struct mint : modint_base {
  unsigned int x;
  static constexpr int mod() {return m;}
  static constexpr unsigned int umod() {return m;}
  mint():x(0) {}
  mint(int64_t x_) {
    int64_t v = int64_t(x_ % umod());
    if(v < 0) v += umod();
    x = (unsigned int)v;
  }
  static mint row(int v) {
    mint v_;
    v_.x = v;
    return v_;
  }
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= umod()) x -= umod();
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += umod()-a.x) >= umod()) x -= umod();
    return *this;
  }
  mint& operator*=(const mint a) {
    uint64_t z = x;
    z *= a.x;
    x = (unsigned int)(z % umod());
    return *this;
  }
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint &operator++() {
    x++;
    if(x == umod()) x = 0;
    return *this;
  }
  mint &operator--() {
    if(x == 0) x = umod();
    x--;
    return *this;
  }
  mint operator++(int) {
    mint result = *this;
    ++*this;
    return result;
  }
  mint operator--(int) {
    mint result = *this;
    --*this;
    return result;
  }
  mint pow(int64_t t) const {
    mint x_ = *this, r = 1;
    while(t) {
      if(t&1) r *= x_;
      x_ *= x_;
      t >>= 1;
    }
    return r;
  }
  mint inv() const { return pow(umod()-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) {return mint(*this) /= a;}
  friend bool operator==(const mint &a, const mint &b) {return a.x == b.x;}
  friend bool operator!=(const mint &a, const mint &b) {return a.x != b.x;}
};

constexpr int64_t safe_mod(int64_t x, int64_t m) {
  x %= m;
  if(x < 0) x += m;
  return x;
}

constexpr int64_t pow_mod_constexpr(int64_t x, int64_t n, int m) {
  if(m == 1) return 0;
  unsigned int _m = (unsigned int)(m);
  uint64_t r = 1;
  uint64_t y = safe_mod(x, m);
  while(n) {
    if(n&1) r = (r*y)%_m;
    y = (y*y)%_m;
    n >>= 1;
  }
  return r;
}

constexpr int primitive_root_constexpr(int m) {
  if(m == 2) return 1;
  if(m == 167772161) return 3;
  if(m == 469762049) return 3;
  if(m == 754974721) return 11;
  if(m == 998244353) return 3;
  int divs[20] = {};
  divs[0] = 2;
  int cnt = 1;
  int x = (m-1)>>1;
  while(~x&1) x >>= 1;
  for(int i = 3; (int64_t)(i)*i <= x; i += 2) {
    if(x%i == 0) {
      divs[cnt++] = i;
      while(x%i == 0) x /= i;
    }
  }
  if(x > 1) divs[cnt++] = x;
  for(int g = 2;; g++) {
    bool ok = true;
    for(int i = 0; i < cnt; i++) {
      if(pow_mod_constexpr(g, (m-1)/divs[i], m) == 1) {
        ok = false;
        break;
      }
    }
    if(ok) return g;
  }
}
template<int m> constexpr int primitive_root = primitive_root_constexpr(m);

constexpr pair<int64_t, int64_t> inv_gcd(int64_t a, int64_t b) {
  a = safe_mod(a, b);
  if(a == 0) return {b, 0};
  int64_t s = b, t = a;
  int64_t m0 = 0, m1 = 1;
  while(t) {
    int64_t u = s/t;
    s -= t*u;
    m0 -= m1*u;
    int64_t tmp = s;
    s = t;
    t = tmp;
    tmp = m0;
    m0 = m1;
    m1 = tmp;
  }
  if(m0 < 0) m0 += b/s;
  return {s, m0};
}

int ceil_pow2(int n) {
  int x = 0;
  while((1U << x) < (unsigned int)(n)) x++;
  return x;
}

template<class mint, is_modint_t<mint>* = nullptr>
void butterfly(vector<mint> &ary) {
  static constexpr int g = primitive_root<mint::mod()>;
  int n = int(ary.size());
  int h = ceil_pow2(n);

  static bool first = true;
  static mint sum_e[30];
  if(first) {
    first = false;
    mint es[30], ies[30];
    int cnt2 = __builtin_ctz(mint::mod()-1);
    mint e = mint(g).pow((mint::mod()-1)>>cnt2), ie = e.inv();
    for(int i = cnt2; i >= 2; i--) {
      es[i-2] = e;
      ies[i-2] = ie;
      e *= e;
      ie *= ie;
    }
    mint now(1);
    for(int i = 0; i < cnt2-2; i++) {
      sum_e[i] = es[i] * now;
      now *= ies[i];
    }
  }
  for(int ph = 1; ph <= h; ph++) {
    int w = 1<<(ph-1), p = 1<<(h-ph);
    mint now(1);
    for(int s = 0; s < w; s++) {
      int offset = s << (h-ph+1);
      for(int i = 0; i < p; i++) {
        mint l = ary[i+offset];
        mint r = ary[i+offset+p] * now;
        ary[i+offset] = l+r;
        ary[i+offset+p] = l-r;
      }
      now *= sum_e[__builtin_ctz(~(unsigned int)(s))];
    }
  }
}

template<class mint, is_modint_t<mint>* = nullptr>
void butterfly_inv(vector<mint> &ary) {
  static constexpr int g = primitive_root<mint::mod()>;
  int n = int(ary.size());
  int h = ceil_pow2(n);

  static bool first = true;
  static mint sum_ie[30];
  if(first) {
    first = false;
    mint es[30], ies[30];
    int cnt2 = __builtin_ctz(mint::mod()-1);
    mint e = mint(g).pow((mint::mod()-1)>>cnt2), ie = e.inv();
    for(int i = cnt2; i >= 2; i--) {
      es[i-2] = e;
      ies[i-2] = ie;
      e *= e;
      ie *= ie;
    }
    mint now(1);
    for(int i = 0; i < cnt2-2; i++) {
      sum_ie[i] = ies[i] * now;
      now *= es[i];
    }
  }
  for(int ph = h; ph >= 1; ph--) {
    int w = 1<<(ph-1), p = 1<<(h-ph);
    mint inow(1);
    for(int s = 0; s < w; s++) {
      int offset = s<<(h-ph+1);
      for(int i = 0; i < p; i++) {
        mint l = ary[i+offset];
        mint r = ary[i+offset+p];
        ary[i+offset] = l+r;
        ary[i+offset+p] = (uint64_t)(mint::mod() + l.x - r.x) * inow.x;
      }
      inow *= sum_ie[__builtin_ctz(~(unsigned int)(s))];
    }
  }
}

template<class mint, is_modint_t<mint>* = nullptr>
vector<mint> convolution(vector<mint> a, vector<mint> b) {
  int n = int(a.size()), m = int(b.size());
  if(!n || !m) return {};
  if(min(n, m) <= 60) {
    if(n < m) {
      swap(n, m);
      swap(a, b);
    }
    vector<mint> ans(n+m-1);
    for(int i = 0; i < n; i++) {
      for(int j = 0; j < m; j++) {
        ans[i+j] += a[i] * b[j];
      }
    }
    return ans;
  }
  int z = 1<<ceil_pow2(n+m-1);
  a.resize(z);
  butterfly(a);
  b.resize(z);
  butterfly(b);
  for(int i = 0; i < z; i++) {
    a[i] *= b[i];
  }
  butterfly_inv(a);
  a.resize(n+m-1);
  mint iz = mint(z).inv();
  for(int i = 0; i < n+m-1; i++) a[i] *= iz;
  return a;
}

template<unsigned int mod = modulo1, class T, enable_if_t<is_integral<T>::value>* = nullptr>
vector<T> convolution(const vector<T> &a, const vector<T> &b) {
  int n = int(a.size()), m = int(b.size());
  if(!n || !m) return {};

  using Mint = mint<mod>;
  vector<Mint> a2(n), b2(m);
  for(int i = 0; i < n; i++) {
    a2[i] = Mint(a[i]);
  }
  for(int i = 0; i < m; i++) {
    b2[i] = Mint(b[i]);
  }
  vector<Mint> c2 = convolution<Mint>(move(a2), move(b2));
  vector<T> c(n+m-1);
  for(int i = 0; i < n+m-1; i++) c[i] = c2[i].x;
  return c;
}

vector<int64_t> convolution_ll(const vector<int64_t> &a, vector<int64_t> &b) {
  int n = int(a.size()), m = int(b.size());
  if(!n || !m) return {};

  static constexpr uint64_t MOD1 = 754974721;  // 2^24
  static constexpr uint64_t MOD2 = 167772161;  // 2^25
  static constexpr uint64_t MOD3 = 469762049;  // 2^26
  static constexpr uint64_t M2M3 = MOD2 * MOD3;
  static constexpr uint64_t M1M3 = MOD1 * MOD3;
  static constexpr uint64_t M1M2 = MOD1 * MOD2;
  static constexpr uint64_t M1M2M3 = MOD1 * MOD2 * MOD3;

  static constexpr uint64_t i1 = inv_gcd(M2M3, MOD1).second;
  static constexpr uint64_t i2 = inv_gcd(M1M3, MOD2).second;
  static constexpr uint64_t i3 = inv_gcd(M1M2, MOD3).second;

  vector<int64_t> c1 = convolution<MOD1>(a, b);
  vector<int64_t> c2 = convolution<MOD2>(a, b);
  vector<int64_t> c3 = convolution<MOD3>(a, b);

  vector<int64_t> c(n+m-1);
  for(int i = 0; i < n+m-1; i++) {
    uint64_t x = 0;
    x += (c1[i] * i1) % MOD1 * M2M3;
    x += (c2[i] * i2) % MOD2 * M1M3;
    x += (c3[i] * i3) % MOD3 * M1M2;
    int64_t diff = c1[i] - safe_mod(int64_t(x), int64_t(MOD1));
    if(diff < 0) diff += MOD1;
    static constexpr uint64_t offset[5] = {0, 0, M1M2M3, 2*M1M2M3, 3*M1M2M3};
    x -= offset[diff%5];
    c[i] = x;
  }
  return c;
}

//begin FFT
template<class Float, enable_if_t<is_floating_point<Float>::value>* = nullptr>
void butterfly(vector<complex<Float>>& ary) {
  int n = int(ary.size());
  int h = ceil_pow2(n);

  using Complex = complex<Float>;
  static bool first = true;
  static Complex sum_e[30];
  if(first) {
    first = false;
    Complex now = 1.0;
    for(int i = 0; i < 28; i++) {
      Complex es = polar(Float(1.0), Float(PI)/(1<<(i+1)));
      sum_e[i] = es * now;
      now *= conj(es);
    }
  }
  for(int ph = 1; ph <= h; ph++) {
    int w = 1<<(ph-1), p = 1<<(h-ph);
    Complex now = Complex(1.0, 0);
    for(int s = 0; s < w; s++) {
      int offset = s<<(h-ph+1);
      for(int i = 0; i < p; i++) {
        Complex l = ary[i+offset];
        Complex r = ary[i+offset+p] * now;
        ary[i+offset] = l+r;
        ary[i+offset+p] = l-r;
      }
      now *= sum_e[__builtin_ctz(~(unsigned int)(s))];
    }
  }
}

template<class Float, enable_if_t<is_floating_point<Float>::value>* = nullptr>
void butterfly_inv(vector<complex<Float>> &ary) {
  int n = int(ary.size());
  int h = ceil_pow2(n);

  using Complex = complex<Float>;
  static bool first = true;
  static Complex sum_ie[30];
  if(first) {
    first = false;
    Complex now = 1.0;
    for(int i = 0; i < 28; i++) {
      Complex es = polar(Float(1.0), Float(PI)/(1<<(i+1)));
      sum_ie[i] = conj(es) * now;
      now *= es;
    }
  }
  for(int ph = h; ph >= 1; ph--) {
    int w = 1<<(ph-1), p = 1<<(h-ph);
    Complex inow = Complex(1.0, 0);
    for(int s = 0; s < w; s++) {
      int offset = s<<(h-ph+1);
      for(int i = 0; i < p; i++) {
        Complex l = ary[i+offset];
        Complex r = ary[i+offset+p];
        ary[i+offset] = l+r;
        ary[i+offset+p] = (l-r) * inow;
      }
      inow *= sum_ie[__builtin_ctz(~(unsigned int)(s))];
    }
  }
  Complex in(1.0/n, 0);
  for(int i = 0; i < n; i++) ary[i] *= in;
}

template<class Complex, enable_if_t<is_complex<Complex>::value>* = nullptr>
vector<Complex> convolution(vector<Complex> a, vector<Complex> b) {
  int n = int(a.size()), m = int(b.size());
  if(!n || !m) return {};
  if(min(n, m) <= 60) {
    if(n < m) {
      swap(n, m);
      swap(a, b);
    }
    vector<Complex> ans(n+m-1);
    for(int i = 0; i < n; i++) {
      for(int j = 0; j < m; j++) {
        ans[i+j] += a[i] * b[j];
      }
    }
    return ans;
  }
  int z = 1<<ceil_pow2(n+m-1);
  a.resize(z);
  butterfly(a);
  b.resize(z);
  butterfly(b);
  for(int i = 0; i < z; i++) {
    a[i] *= b[i];
  }
  butterfly_inv(a);
  a.resize(n+m-1);
  return a;
}

template<class Float, enable_if_t<is_floating_point<Float>::value>* = nullptr>
vector<Float> convolution(vector<Float> &a, vector<Float> &b) {
  int n = int(a.size()), m = int(b.size());
  if(!n || !m) return {};

  using Complex = complex<Float>;
  vector<Complex> a2(n), b2(m);
  for(int i = 0; i < n; i++) a2[i] = Complex(a[i], 0);
  for(int i = 0; i < m; i++) b2[i] = Complex(b[i], 0);
  vector<Complex> c2 = convolution(move(a2), move(b2));
  vector<Float> c(n+m-1);
  for(int i = 0; i < n+m-1; i++) c[i] = c2[i].real();
  return c;
}

//modulo1 998244353
//modulo2 1000000007
//vector<mint<m>> convolution(vector<mint<m>>, vector<mint<m>>)
//vector<T> convolution<mod = modulo1>(vector<T>&, vector<T>&) ##is_integral<T>::value == true
//vector<int64_t> convolution_ll(vector<int64_t>&, vector<int64_t>&)
//vector<Complex> convolution(vector<Complex>, vector<Complex>)
//vector<Float> convolution(vector<Float>&, vector<Float>&)

} // namespace fft

#define N 200100
#define M 1009

//head

int n, m, k;
int cnt[N];
PQG<P> q;
vvi info;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> k;
  rep(i, n) {
    int a;
    cin >> a;
    cnt[a-1]++;
  }
  
  rep(i, m) {
    if(cnt[i]) {
      q.emplace(cnt[i]+1, info.size());
      info.emplace_back(vi(cnt[i]+1, 1));
    }
  }
  while(q.size() != 1) {
    vi &now = info[q.top().second];
    q.pop();
    vi &pre = info[q.top().second];
    q.pop();
    vi c = fft::convolution(now, pre);
    if(c.size() > k) c.resize(k+1);
    rep(i, c.size()) if(c[i] > M) c[i] %= M;
    q.emplace(c.size(), info.size());
    info.emplace_back(c);
  }
  cout << info.back()[k] << endl;
}