/*
TASK:TREES
LANG:C++
*/
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int n,m,k;
vector<int>a;
vector<int>b;
struct branch
{
  int index;
  int length;
};
vector<branch>c;
bool cmp(branch x,branch y)
{
  return x.length>=y.length;
}
void go(int h)
{
  int t;
  t=a[h]-1;
  if(t<0)
  {
    c[h].length=1;
    c[h].index=h;
  }
  else
  if(c[t].length)
  {
    c[h].length=c[t].length+1;
    c[h].index=h;
  }
  else
    go(t);
}
void mark(int h)
{
  int t;
  t=a[h]-1;
  c[h].length=0;
  if(t!=-1)
    mark(t);
}

bool cmp2(int x, int y)
{
  return x<y;
}
int main()
{
  int t;
  branch tm;
  tm.index=0;
  tm.length=0;
  int j=1;
  cin>>n>>m>>k;
  for(int i=0; i<n; i++)
  {
    cin>>t;
    a.push_back(t);
    c.push_back(tm);
  }
  for(int i=0; i<m; i++)
  {
    cin>>t;
    b.push_back(t);
  }
  for(int i=0; i<n; i++)
     go(i);
  for(int i=0; i<m; i++)
    mark(b[i]-1);
  sort(c.begin(),c.end(),cmp);
  int cnt=0;
  for(int i=0; i<n; i++)
   if(c[i].length)
     cnt++;
   else
     break;
  vector<int>res;
  for(int i=0; i<cnt+1; i++)
  {
    t=c[i].index;
    res[i]=t;
  }
  double r1=cnt;
  r1/=n;
  double r2=k;
  r2/=100;
  vector<int>rs;
  if(r1>r2)
  {
    r1=0;
    while(r1<r2)
    {
      int t=res[j-1]+1;
      rs.push_back(t);
      j++;
      r1=j;
      r1/=n;
    };
    t=res[j-1]+1;
    rs.push_back(t);
    sort(rs.begin(),rs.end(),cmp2);
    for(int i=0; i<j-1; i++)
      cout<<rs[i]<<" ";
    cout<<rs[j-1]<<"\n";
  }
  else
    cout<<cnt<<"\n";
  return 0;
}
