#include <bits/stdc++.h>
using namespace std;

int All_Indices(int arr[], int size, int x, int idx, int fsf){
	if(idx == size){
		return 0;
	}
	if(arr[idx] == x){
		int iarr[] = {All_Indices(arr, size, x, idx + 1, fsf + 1)};
		iarr[fsf] == idx;
		cout<<iarr;
	} else {
		int iarr[] = {All_Indices(arr,size, x, idx+1, fsf)};
		cout<<iarr;
	}
}

int main(){
	int n;
	cin>>n;
	int arr[n];
	int length = sizeof(arr)/sizeof(arr[0]);
	for(int i = 0; i < length; i++){
		cin>>arr[i];
	}
	int data;
	cin>>data;
	int iarr[] = {All_Indices(arr,length,data,0,0)};
	int length1 = sizeof(iarr)/sizeof(iarr[0]);
	if(length1 == 0){
		cout<<""<<endl;
		return 0;
	}
	for(int i = 0; i < length1; i++){
		cout<<iarr[i]<<endl;
	}
}
