#include <bits/stdc++.h>
using namespace std;
const int N = 502, M = 1000000007;
int n, m, p[N], w[N], i, j, k, c[N], d[N];
long long o, f[N], s[N], x[N], t[N], g[N], Ans;
void init() {
  scanf("%d%d%lld", &n, &m, &o);
  for (i = 1; i <= n; i++) scanf("%d", p + i);
  for (i = 1; i <= m; i++) {
    scanf("%d", w + i);
    k = max(k, w[i]);
    d[w[i]]++;
  }
  for (i = 1; i <= m; i++) c[k - w[i]]--;
  c[k] = 1;
}
void qwq(long long *x, long long *y, long long *z) {
  memset(t, 0, sizeof(t));
  int i, j;
  long long o;
  for (i = 0; i < k; i++)
    for (j = 0; j < k; j++) t[i + j] = (t[i + j] + x[i] * y[j]) % M;
  for (i = k * 2 - 2; i >= k; i--) {
    o = t[i];
    for (j = 0; j <= k; j++) t[i - k + j] = (t[i - k + j] - o * c[j]) % M;
  }
  for (i = 0; i < k; i++) z[i] = t[i];
}
void work() {
  for (i = 1; i <= n; i++) {
    memset(s, 0, sizeof(s));
    memset(x, 0, sizeof(x));
    s[0] = 1;
    if (k > 1)
      x[1] = 1;
    else
      x[0] = -c[0];
    while (p[i]) {
      if (p[i] & 1) qwq(s, x, s);
      p[i] >>= 1;
      qwq(x, x, x);
    }
    for (j = 0; j < k; j++) f[j] = (f[j] + s[j]) % M;
  }
  memset(s, 0, sizeof(s));
  s[0] = 1;
  while (o) {
    if (o & 1) qwq(s, f, s);
    o >>= 1;
    qwq(f, f, f);
  }
  g[0] = 1;
  for (i = 0; i < k; i++)
    for (j = 0; j <= i; j++) g[i] = (g[i] + g[i - j] * d[j]) % M;
  for (i = 0; i < k; i++) Ans = (Ans + s[i] * g[i]) % M;
  printf("%lld", (Ans + M) % M);
}
int main() {
  init();
  work();
  return 0;
}
