#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) v.begin(),v.end() constexpr ll MOD=998244353; constexpr ll INF=2e18; int main(){ int n, m; cin >> n >> m; VI a(n); vector

p(n); REP(i,n){ cin >> a[i]; p[i]={a[i],i}; } sort(ALL(p)); VVI g(110000); int u, v; REP(i,m){ cin >> u >> v; u--, v--; g[u].push_back(v); g[v].push_back(u); } VI f(n,0); int k; cin >> k; int b; REP(i,k){ cin >> b; f[b-1]=1; } int z=0; VI ans; REP(i,n){ if(f[p[i].second]){ z++; ans.push_back(p[i].second+1); for(auto to:g[p[i].second]){ if(p[i].first