关于Java Stream的骚操作,如何在分组后,映射对象的字段

问题描述
现在有一个学生的集合,我想根据学生的性别和年龄进行分类,并且最后只保存学生的姓名。
相关代码

public class Student {
    private String name; // 姓名
    private Integer sex; // 0:女,1:男
    private Integer age; // 年龄
    // get 和 set 省略
}
    public static void main(String[] args) {
        List<Student> students = new ArrayList<>();

        //这是我能做到的这一步
        Map<Integer, Map<Integer, List<Student>>> collect = students.stream()
                .collect(Collectors.groupingBy(Student::getSex, Collectors.groupingBy(Student::getAge)));
        // 如何将获得这个类型的返回结果
        Map<Integer, Map<Integer, List<String>>> res;
    }

最后只保存学生的名字

    Map<Integer, Map<Integer, List<String>>> res = students.stream().collect(Collectors.groupingBy(Student::getSex, Collectors.groupingBy(Student::getAge, Collectors.collectingAndThen(Collectors.toList(), item -> item.stream().map(Student::getName).collect(Collectors.toList())))));