import java.io.*; import java.util.*; public class contest { public static void main(String[] argv) throws Exception { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int nTeams = Integer.parseInt(in.readLine().trim()); int bestSolved = 0; int bestPenalty = Integer.MAX_VALUE; String bestName = null; for(int i=0;i 0){ solved++; penalty+=time+(subs-1)*20; } } System.err.println(name+" "+solved+" "+penalty); if(solved>bestSolved || (solved == bestSolved && penalty < bestPenalty)){ bestSolved = solved; bestPenalty = penalty; bestName = name; } } System.out.println(bestName+" "+bestSolved+" "+bestPenalty); } }