      PROGRAM ROT_N
      IMPLICIT NONE
      integer(16) :: n
      character(10**4) :: s
      integer(16) :: a,z,len,i,ch
      character(:),allocatable :: ans
      
      read*,n
      read*,s
      
      
      len = len_trim( s )
      
      allocate( character(len) :: ans )
      
      a = ichar( 'A' )
      z = ichar( 'Z' )
      
      DO i = 1,len
        ch = ichar( s(i:i) )
        ch = ch + n
        if( ch>z )then
          ch = ch - 26
        end if
        ans(i:i) = char( ch )
      END DO
      
      print*,trim( ans )
      
      END PROGRAM