#include <bits/stdc++.h>
#define N 500020
using namespace std;
inline int read(){
int x=0,f=1;char ch=getchar();
while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar());
while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
return f?x:-x;
}
int to[N], nxt[N], head[N], cnt;
void insert(int x, int y) {
to[++ cnt] = y;
nxt[cnt] = head[x];
head[x] = cnt;
}
// tarjan
int dfn[N], low[N], que[N], blo[N], qnt, bnt, tot, sz[N];
void tarjan(int x) {
dfn[x] = low[x] = ++ tot;
que[++ qnt] = x;
for (int i = head[x]; i; i = nxt[i])
if (!dfn[to[i]]) tarjan(to[i]), low[x] = min(low[x], low[to[i]]);
else if (!blo[to[i]]) low[x] = min(low[x], dfn[to[i]]);
if (dfn[x] == low[x] && ++ bnt)
while (que[qnt + 1] != x)
blo[que[qnt --]] = bnt, sz[bnt] ++;
}
int a[N], ed[N];
int to2[N], nxt2[N], head2[N], cnt2;
void insert2(int x, int y) {
// printf("%d -> %d\n", x, y);
to2[++ cnt2] = y;
nxt2[cnt2] = head2[x];
head2[x] = cnt2;
}
int e1[N], e2[N];
int ed2[N], val[N], f[N], g[N];
int main() {
int n = read(), m = read();
for (int i = 1; i <= m; ++ i) {
e1[i] = read();
e2[i] = read();
if (e1[i] != e2[i]) {
insert(e1[i], e2[i]);
}
}
for (int i = 1; i <= n; ++ i) {
a[i] = read();
}
int S = read(), P = read();
for (int i = 1; i <= P; ++ i) {
ed[read()] = 1;
}
for (int i = 1; i <= n; ++ i) {
if (!dfn[i]) tarjan(i);
}
for (int i = 1; i <= m; ++ i) {
int b1 = blo[e1[i]];
int b2 = blo[e2[i]];
if (b1 != b2) {
insert2(b1, b2);
}
}
for (int i = 1; i <= n; ++ i) {
ed2[blo[i]] |= ed[i];
val[blo[i]] += a[i];
}
int l = 0, r = 0, ans = 0;
que[++ r] = blo[S];
f[blo[S]] = val[blo[S]];
g[blo[S]] = 1;
while (l < r) {
int x = que[++ l];
if (ed2[x]) {
ans = max(ans, f[x]);
}
for (int i = head2[x]; i; i = nxt2[i]) {
f[to2[i]] = max(f[to2[i]], f[x] + val[to2[i]]);
if (!g[to2[i]]) {
g[to2[i]] = 1;
que[++ r] = to2[i];
}
}
}
printf("%d\n", ans);
}