import java.math.BigDecimal;
import java.util.*;

class Solution {
    public static void main(String []args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n + 2];
        for (int i = 0; i < n; i++) {
            s[i] = sc.next();
        }
        sc.close();

        //Write your code here
        Arrays.sort(s, Collections.reverseOrder(new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                if (o1 != null && o2 != null) {
                    BigDecimal d1 = new BigDecimal(o1);
                    BigDecimal d2 = new BigDecimal(o2);
                    return d1.compareTo(d2);
                }
            }
        }));

        //Output
        for(int i = 0; i < n; i++)
        {
            System.out.println(s[i]);
        }
    }
}

@@ -716,32 +716,58 @@
               %7D%0A
+                return 0;%0A
             %7D%0A  

Return 0 by default