import java.util.*;
public class Main {
public static ArrayList<Integer> solution(int n, int[] arr) {
ArrayList<Integer> answer = new ArrayList<>();
//원본 배열에 영향을 끼친다.,
//int[] arr2 = arr;
//Arrays.sort(arr2);
//System.out.println(Arrays.toString(arr));
int[] arr2 = arr.clone();
Arrays.sort(arr2);
for(int i = 0; i < n; i++) {
if(arr[i] != arr2[i]) answer.add(i+1);
}
System.out.println(answer);
return answer;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] arr1 = {120,125,152,130,135,135,143,127,160};
int[] arr2 = {1,5,3,5,1,2,1,4};
int[][] arr3 = {{3,4,1,2}, {4,3,2,1}, {3,1,4,2}};
solution(9,arr1);
}
}