def choose_grade():
    print("选择老师:")
    data.print_teachers()
    teacher_name = input("老师名:")
    teacher = data.get_teacher(teacher_name)
    if teacher == None:
        print("老师选择错误")
        return

    print("选择班级:")
    data.print_grades()
    grade_name = input("班级名:")
    grade = data.get_grade(grade_name)
    if grade == None:
        print("班级选择错误")
        return

    teacher.choose_grade(grade)
    data.update_teacher(teacher)
def choose_grade():
    print("选择学生:")
    data.print_students()
    student_name = input("学生名:")
    student = data.get_student(student_name)
    if student == None:
        print("学生选择错误")
        return

    print("选择班级:")
    data.print_grades()
    grade_name = input("班级名:")
    grade = data.get_grade(grade_name)
    if grade == None:
        print("班级选择错误")
        return

    student.choose_grade(grade)
    data.update_student(student)
    data.update_grade(grade)
def add_student():
    print("请填写学生信息:")
    name = input("姓名:")

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    print("选择班级:")
    data.print_grades()
    grade_name = input("班级名:")
    grade = data.get_grade(grade_name)
    if grade == None:
        print("班级选择错误")
        return

    student = education.Student(name, school, grade)
    data.update_student(student)
    data.update_school(school)
    data.update_grade(grade)
def show_grades():
    data.print_grades()