import java.util.*; import java.text.*; public class Main { static class ob { String code, name, cl; public ob(String code, String name,String cl){ this.code = code; this.name = name; this.cl = cl; } @Override public String toString(){ return code + " " + name + " " + cl; } } static class ob2 { ArrayList a; String name; public ob2( String name){ this.name = name; this.a = new ArrayList<>(); } public void add(ob o){ this.a.add(o); } public void out(){ System.out.printf("Danh sach cho giang vien %s:\n", name); a.forEach(e -> System.out.println(e)); } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); HashMap hm = new HashMap<>(); sc.nextLine(); for(int i=0;i{ v.a.sort((ob x, ob y) -> { if(x.code.compareTo(y.code) == 0) return x.cl.compareTo(y.cl); return x.code.compareTo(y.code); }); }); int m = sc.nextInt(); sc.nextLine(); for(int i=0;i