program main
    implicit none
    integer(4):: i
    character(3), parameter:: week(7) = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    character(3):: input_week
    read*, input_week

    do i = 1, 6
        if (week(i) == input_week) print*, week(i+1)
    end do

    print*, week(1)



end program main