import java.util.*; import java.io.*; class prob365 { public static void main(String args[])throws IOException { BufferedReader sc=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(sc.readLine())+1; String s[]=sc.readLine().split(" "); int a[]=new int[n]; for(int i=1;i=0;i--) { int b[]=new int[n]; for(int j=1;j