using System;
using System.Linq;
namespace task29760750
{
internal class Program
{
private static void Main(string[] args)
{
var N = int.Parse(Console.In.ReadLine());
var array = Console.In.ReadLine()
.Split(' ')
.Select(int.Parse)
.ToArray();
var X = int.Parse(Console.In.ReadLine());
var indices = array
.Select((t, i) => t == X ? i : -1)
.Where(t => t > 0)
.ToArray();
Console.Out.WriteLine(indices.Any() ? string.Join(" ", indices) : "-1");
}
}
}