program b
    implicit none
    integer :: N, l, i
    character(10000) :: S

    read(*, *) N
    read(*, *) S

    l = len_trim(S)

    do i = 1, l
        S(i:i) = achar(mod(ichar(S(i:i)) - 65 + N, 26) + 65)
    end do
    
    write(*, '(a)') trim(S)

end program b