import java.util.*;
public class Main {
public static void main(String args[]) {
// Your Code Here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] arr = new int[n];
for(int i=0;i<n;i++){
arr[i] = sc.nextInt();
}
int target = sc.nextInt();
int[] ans = allIndices(arr,0,target,0);
for(int val : ans){
System.out.println(val);
}
}
public static int[] allIndices(int[] arr ,int si, int target,int count){
if(si==arr.length){
int[] bc = new int[count];
return bc;
}
//point
int[] indices = null;
if(arr[si] == target){
indices = allIndices(arr,si+1,target,count+1);
}else{
indices = allIndices(arr,si+1,target,count);
}
if(arr[si] == target){
indices[count] = si;
}
return indices;
}
}