import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
List<Record> list = new ArrayList<Record>();
Collections.sort(list, new Comparator<Record>(){
public int compare(Record o1, Record o2) {
if(o1.getKey1() > o2.getKey1()){
return 1;
}else if(o1.getKey1() == o2.getKey1()){
if(o1.getKey2() > o2.getKey2()){
return 1;
}else if(o1.getKey2() == o2.getKey2()){
//TODO: compare key3
return -1;
}else{
return 0;
}
}else{
return 0;
}
}
});
}
}
class Record{
private int key1, key2, key3;
public int getKey1() {
return key1;
}
public int getKey2() {
return key2;
}
public int getKey3() {
return key3;
}
}