#include <bits/stdc++.h>
using namespace std;
const int N = 255;
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
namespace ModCalculator {
const int MOD = 1e9 + 7;
inline void Inc(int &x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
inline void Dec(int &x, int y) {
  x -= y;
  if (x < 0) x += MOD;
}
inline int Add(int x, int y) {
  Inc(x, y);
  return x;
}
inline int Sub(int x, int y) {
  Dec(x, y);
  return x;
}
inline int Mul(int x, int y) { return 1LL * x * y % MOD; }
inline int ksm(int x, int k) {
  int ret = 1;
  for (; k; k >>= 1) {
    if (k & 1) ret = Mul(ret, x);
    x = Mul(x, x);
  }
  return ret;
}
inline int Inv(int x) { return ksm(x, MOD - 2); }
}  // namespace ModCalculator
using namespace ModCalculator;
int F, B;
long long M;
int p[N], c[N], k, f[N], g[N], h[N], tmp[N << 1];
void DP(int *a, int *b) {
  memset(tmp, 0, sizeof(tmp));
  for (int i = 0; i < k; ++i) {
    for (int j = 0; j < k; ++j) {
      Inc(tmp[i + j], Mul(a[i], b[j]));
    }
  }
  for (int i = k + k - 2; i >= k; --i) {
    for (int j = 1; j <= B; ++j) {
      Inc(tmp[i - c[j]], tmp[i]);
    }
  }
  for (int i = 0; i < k; ++i) {
    a[i] = tmp[i];
  }
}
void Ksm(int *a, long long y, int *ret) {
  ret[0] = 1;
  for (; y; y >>= 1) {
    if (y & 1) DP(ret, a);
    DP(a, a);
  }
}
void init() {
  read(F);
  read(B);
  read(M);
  for (int i = 1; i <= F; ++i) {
    read(p[i]);
  }
  for (int i = 1; i <= B; ++i) {
    read(c[i]);
    k = max(k, c[i]);
  }
  if (k == 1) ++k;
}
void solve() {
  for (int i = 1; i <= F; ++i) {
    memset(f, 0, sizeof(f));
    f[1] = 1;
    memset(h, 0, sizeof(h));
    Ksm(f, p[i], h);
    for (int j = 0; j < k; ++j) {
      Inc(g[j], h[j]);
    }
  }
  memset(h, 0, sizeof(h));
  Ksm(g, M, h);
  for (int i = k - 1; i >= 1; --i) {
    for (int j = 1; j <= B; ++j) {
      if (i >= c[j]) {
        Inc(h[i - c[j]], h[i]);
      }
    }
  }
  printf("%d\n", h[0]);
}
int main() {
  init();
  solve();
  return 0;
}
