#include <bits/stdc++.h>
using namespace std;
vector<int> q[100005];
int a[100005], val;
struct abc {
  int x, v, cnt, tmp;
} z[100005];
bool cmp(abc b, abc c) { return b.v > c.v; }
void dfs(int cur) {
  for (int i = 0; i < q[cur].size(); i++) {
    z[q[cur][i]].v = ++val;
    dfs(q[cur][i]);
  }
}
int dfs1(int cur) {
  int j = 1;
  for (int i = 0; i < q[cur].size(); i++) j += dfs1(q[cur][i]);
  if (z[cur].cnt) {
    z[cur].tmp = j;
    j = 0;
  }
  return j;
}
int main() {
  int n, m, i, j, k;
  scanf("%d", &n);
  scanf("%d", &m);
  while (m--) {
    scanf("%d", &i);
    scanf("%d", &j);
    a[j] = 1;
    q[i].push_back(j);
  }
  for (i = 1; i <= n; i++) z[i].x = i;
  for (i = 1; i <= n; i++) {
    scanf("%d", &j);
    z[j].cnt++;
  }
  val = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] == 0) {
      z[i].v = ++val;
      dfs(i);
    }
  }
  for (i = 1; i <= n; i++) {
    if (a[i] == 0) dfs1(i);
  }
  for (i = 1; i <= n; i++) {
    if (z[i].cnt != z[i].tmp) break;
  }
  if (i <= n) {
    printf("-1\n");
    return 0;
  }
  sort(z + 1, z + n + 1, cmp);
  j = 0;
  for (i = 1; i <= n; i++) {
    if (z[i].cnt) j++;
  }
  printf("%d\n", j);
  for (i = 1; i <= n; i++) {
    if (z[i].cnt) printf("%d\n", z[i].x);
  }
  return 0;
}
