import java.io.*; public class exchange { static class Issuer { String name; int buyer; double value; public Issuer() { } public Issuer(String a, int b, int c) { name = a; buyer = b; value = c; } } public static void main(String[] args) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while(!(s= in.readLine()).equals("0 END")) { //String s = in.readLine(); String[] ar = s.split(" "); int count = Integer.parseInt(ar[0]); int n_sell = 0; int n_buy = 0; String comp_name = ar[1]; Issuer[] iss = new Issuer[count]; for(int i = 0;i= iss[i].value) { System.out.print(" "+buyers[j].name); je = true; } } if(!je) System.out.print(" NO-ONE"); } System.out.println(); } } } catch(Exception e) { System.out.println(e.toString()); } } }