// luogu-judger-enable-o2
#include<cstdio>
#include<stack>
#include<cstring>
#include<algorithm>
#include<queue>
#define Pair pair<int,int>
#define F first
#define S second
using namespace std;
const int MAXN=1e6+10;
inline int read()
{
char c=getchar();int x=0,f=1;
while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
return x*f;
}
struct node
{
int u,v,w,nxt;
}E[MAXN],edge[MAXN];
int headE[MAXN],numE=1,head[MAXN],num=1;
inline void add_edge(int x,int y)
{
E[numE].u=x;
E[numE].v=y;
E[numE].nxt=headE[x];
headE[x]=numE++;
}
inline void AddEdge(int x,int y)
{
edge[num].u=x;
edge[num].v=y;
edge[num].nxt=head[x];
head[x]=num++;
}
int N,M,S,P;
int money[MAXN],pos[MAXN],sum[MAXN];
int vis[MAXN],dfn[MAXN],low[MAXN],color[MAXN],colornum=0,tot=0;
stack<int>s;
void tarjan(int now)
{
dfn[now]=low[now]=++tot;
s.push(now);
vis[now]=1;
for(int i=headE[now];i!=-1;i=E[i].nxt)
{
if(!dfn[E[i].v])
tarjan(E[i].v),low[now]=min(low[now],low[E[i].v]);
else if(vis[E[i].v])
low[now]=min(low[now],dfn[E[i].v]);
}
if(low[now]==dfn[now])
{
int h;
colornum++;
do
{
h=s.top();
color[h]=colornum;
sum[colornum]+=money[h];
vis[h]=0;
s.pop();
}while(h!=now);
}
}
int dis[MAXN];
void Dijstra()
{
memset(dis,0,sizeof(dis));
memset(vis,0,sizeof(vis));
priority_queue<Pair>q;
dis[color[S]]=sum[color[S]];
q.push(make_pair(dis[color[S]],color[S]));
while(q.size()!=0)
{
while(vis[q.top().S]&&q.size()>0) q.pop();
int p=q.top().S;
vis[p]=1;
for(int i=head[p];i!=-1;i=edge[i].nxt)
if(vis[edge[i].v]==0&&dis[edge[i].v]<dis[p]+sum[edge[i].v])
dis[edge[i].v]=dis[p]+sum[edge[i].v],
q.push(make_pair(dis[edge[i].v],edge[i].v));
}
int ans=0;
for(int i=1;i<=P;i++)
ans=max(ans,dis[color[pos[i]]]);
printf("%d",ans);
}
int main()
{
#ifdef WIN32
freopen("a.in","r",stdin);
#else
#endif
memset(head,-1,sizeof(head));
memset(headE,-1,sizeof(headE));
N=read();M=read();
for(int i=1;i<=M;i++)
{
int x=read(),y=read();
add_edge(x,y);
}
for(int i=1;i<=N;i++) money[i]=read();
S=read();P=read();
for(int i=1;i<=P;i++) pos[i]=read();
for(int i=1;i<=N;i++)
if(!dfn[i])
tarjan(i);
for(int i=1;i<=numE-1;i++)
if(color[E[i].u]!=color[E[i].v])
AddEdge(color[E[i].u],color[E[i].v]);
Dijstra();
return 0;
}