n,m,k=map(int,input().split()) x=[*map(lambda a:int(a)-1,input().split())] g=[[] for _ in range(n)] for i in range(m): u,v=map(int,input().split()) g[u-1].append(v-1) g[v-1].append(u-1) f=[[1]*n for _ in range(n)] for e in x: dp=[[0]*n for _ in range(1<>nx)&1:continue ndp[S|(1<