#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int f, bb;
long long n;
int pm[15], qm[105], c[505], a[505], d[505];
void mul(int a[], int b[]) {
  int i, j, s, p, q, c[505] = {0};
  for (i = 0; i <= 250; i++) {
    if (a[i] == 0) continue;
    for (j = 0; j <= 250; j++) {
      if (b[j] == 0) continue;
      c[i + j] = (c[i + j] + 1LL * a[i] * b[j]) % mod;
    }
  }
  for (i = 0; i <= 500; i++) a[i] = c[i];
  for (i = 500; i > 250; i--) {
    for (j = 0; j < bb; j++) a[i - qm[j]] = (a[i - qm[j]] + a[i]) % mod;
  }
}
void power(int b[], long long n) {
  int i, j, s, p, q;
  memset(a, 0, sizeof(a));
  a[0] = 1;
  while (n) {
    if (n & 1) mul(a, b);
    mul(b, b);
    n >>= 1;
  }
}
int main() {
  scanf("%d%d%lld", &f, &bb, &n);
  int i, j, s, p, q;
  for (i = 0; i < f; i++) scanf("%d", &pm[i]);
  for (i = 0; i < bb; i++) scanf("%d", &qm[i]);
  for (i = 0; i < f; i++) {
    memset(c, 0, sizeof(c));
    c[1] = 1;
    power(c, pm[i]);
    for (j = 0; j <= 250; j++) d[j] = (d[j] + a[j]) % mod;
  }
  power(d, n);
  for (i = 250; i >= 0; i--) {
    for (j = 0; j < bb; j++) {
      if (qm[j] <= i) a[i - qm[j]] = (a[i - qm[j]] + a[i]) % mod;
    }
  }
  printf("%d\n", a[0]);
  return 0;
}
