import java.util.Scanner; public class Main{ static class goods{ public goods(String n, String u, int b, int s,int i){ name = n; unit = u; buy = b; sell = s; pro = s - b; String str = Integer.toString(i); code = i; } public String sCode(){ String s = Integer.toString(code); while(s.length()<3) s = "0" + s; return "MH" + s; } public boolean small(goods b){ if(pro == b.pro) return code > b.code; return pro < b.pro; } String name, unit; int buy,sell,pro,code; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); goods[] a = new goods[n]; for(int i=0; i