import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class New { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int len=sc.nextInt(); List arr=new ArrayList<>(len); List result=new ArrayList<>(len); for(int i=0;i arr){ Integer minA=Integer.MAX_VALUE; Integer minB=Integer.MAX_VALUE; int offset=-1; Integer prev=arr.getFirst(); for(int i=1,size=arr.size();i