students = ["Криви", "Шинкаренко", "Капитонов"]
summer_grades = [4.5, 5.0, 3.8]
winter_students = ["Капитонов", "Криви", "Шинкаренко"]
winter_grades = [4.1, 4.3, 4.7]


surname = input("Введите фамилию студента: ")
if surname in students:
    index = students.index(surname)
    summer_grade = summer_grades[index]
    
    if surname in winter_students:
        winter_index = winter_students.index(surname)
        winter_grade = winter_grades[winter_index]
        
        print(f"Студент {surname}:")
        print(f"  Летняя сессия: {summer_grade}")
        print(f"  Зимняя сессия: {winter_grade}")
        print(f"  Средний балл:{(summer_grade + winter_grade) / 2:.2f} ")

    else:
        print(f"Студент {surname} не найден в списке зимней сессии")
else:
    print(f"Студент {surname} не найден в списке студентов")
