#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
#include<unordered_set>
#include<functional>
#include<vector>
using namespace std;
const int N = 2e5+ 10;
int n,m,k,in,du[N],u,v;
int nxt[N], a[N];
queue<int> q;
vector<int> g[N];
unordered_set<int> st;
int head;
int main()
{
memset(du, 0, sizeof du);
cin >> n >> m;
for(int i = 1; i <= m; i++)
{
cin >> u >> v;
g[u].push_back(v);
du[v] ++;
}
cin >> k;
for(int i = 1; i <= k; i++)
{
cin >> a[i];
st.insert(a[i]);
}
for(int i = 1; i <= n; i++)
{
if(du[i] == 0 && !st.count(i)) q.push(i);
}
vector<int> res;
bool v[N];
memset(v,0,sizeof v);
while(q.size())
{
auto i = q.front();
res.push_back(i);
q.pop();
for(auto j: g[i])
{
du[j]--;
if(du[j] == 0 && !st.count(j) && !v[j]) q.push(j), v[j] = 1;
}
}
for(int i = 1; i <= k; i++)
{
if(du[a[i]] != 0)
{
cout << -1 << endl;
return 0;
}else{
res.push_back(a[i]);
for(auto j: g[a[i]])
{
du[j]--;
if(!st.count(j) && !v[j] && du[j] == 0) q.push(j), v[j] = 1;
}
}
}
while(q.size())
{
auto i = q.front();
res.push_back(i);
q.pop();
for(auto j: g[i])
{
du[j]--;
if(du[j] == 0 && !st.count(j) && !v[j]) q.push(j), v[j] = 1;
}
}
if(res.size() != n)
{
cout<<-1<<endl;
return 0;
}
for(auto i: res) cout << i << ' ';
return 0;
}