#include <bits/stdc++.h>
using namespace std;
long long a[200],i,n,k;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
cin>>k;
kt=false;
for (i=1; i<=n; i++)
if (a[i]==k)
{
cout<<i<<" ";
kt=true;
}
cout<<endl;
if (kt==false) cout<<"Khong co so k trong day"<<endl;
sort(a+1,a+n+1);
for (i=1; i<=n; i++) cout<<a[i]<<" ";
return 0;
}