/*
TASK: trees
LANG: C++
*/
#include <set>
#include <vector>
#include <queue>
#include <iostream>
using namespace std;

struct list
{
       list* next;
       int v;
       list(){v = -1;}
};

bool birdNotFree[30001];
//vector<vector<int> > G(30001);

list table[30000]; 
void pushBack(int a, int b)
{
     list* t = new list;
     *t = table[a];
     
     table[a].next = t;
     table[a].v = b;
}

struct A
{
    int depth;
    int num;
    A(int a, int b)
    {
          depth = a;
          num = b;
    }
    
    bool operator<(A a) const
    {
          if (depth != a.depth)
           return depth > a.depth;
          return num > a.num; 
    }
};

vector<int> input;
int toCut;
bool impossible;
int impans;
vector<int> ans;

void BFS()
{     
     multiset<A> heap;
     
     queue<A> q;
     q.push(A(0, 0));
     while (!q.empty())
     {
           A v = q.front();
           if (!birdNotFree[v.num])
            heap.insert(v);
           q.pop();
           
           for (list* p = &table[v.num]; p->v != -1; p = p->next)
            q.push(A(v.depth + 1, p->v));
     }
     int stefan = toCut;
     for (multiset<A>::iterator it = heap.begin(); it != heap.end() && toCut > 0; it++)
     {
         toCut--;
         ans.push_back((*it).num);
     }
     if (toCut > 0)
     {
          impossible = 1;
          impans = stefan - toCut;
     } 
}
           
void markBack(int a)
{
     if (birdNotFree[a]) return;
     birdNotFree[a] = 1;   
     markBack(input[a - 1]);
}
 
int main()
{
    birdNotFree[0] = 1;
    int N, M;
    double K;
    cin >> N >> M >> K;
    toCut = (int)((K/100)*N);
    if ((K/100)*N - (int)((K/100)*N) != 0) toCut++;
    
    for (int i = 1; i <= N; i++)
    {
        int t;
        cin >> t;
        pushBack(t, i);
        input.push_back(t);
    }
    
    for (int i = 0; i < M; i++)
    {
        int t;
        cin >> t;
        markBack(t);
    }

    BFS();
    
    if (impossible)
     cout << impans << endl;
    else
    {
        sort(ans.begin(), ans.end());
        if (ans.size() > 0) 
         cout << ans[0];
        for (int i = 1; i < ans.size(); i++)
         cout << " " << ans[i];
        cout << endl;
    }
        
    return 0;
}
