import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int k = sc.nextInt(); int[] nums = new int[k]; for (int i = 0; i < k; i++) { nums[i] = sc.nextInt(); } for (int i = 0; i < k; i++) { if (i == 0) { if (nums[0] != nums[1]) { System.out.print(0 + " "); } } else if (i == k - 1) { if (nums[k - 1] != nums[k - 2]) { System.out.print(k - 1 + " "); } } else if (nums[i] > nums[i - 1] && nums[i] > nums[i + 1] || nums[i] < nums[i - 1] && nums[i] < nums[i + 1]) { System.out.print(i + " "); } } System.out.println(); } } }