let rec seq s t = if s > t then []
                  else s :: seq (s + 1) t

let _ =
  let n = read_int () in
  let read n =
    let rec loop n acc =
      if n = 0 then acc else loop (n-1) (read_line () :: acc) in
    loop n [] in
  let sl = read n in
  let t = read_line () in
  let rs = List.map (fun (i,x) -> i) @@ List.filter (fun (i,x) -> x = t) @@ List.map2 (fun x y -> (x,y)) (seq 1 (n+1)) (List.sort compare (t :: sl)) in
  print_endline @@ String.concat " " (List.map string_of_int rs)
