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

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