1 of 3

dc, 39

?dsiZdsl[[]r1-d0<m]dsmxklixzll-2%B*C1+P

dc is not known for its string handling, but we have just enough here to get this to work:

?dsi                                    # Read input string, duplicate, store in register i
    Zdsl                                # Get input length, duplicate, store in register l
        [         ]                     # define macro to:
         []                             #   push empty string
           r                            #   swap empty string and remaining length 
            1-                          #   subtract 1 from length
              d0                        #   duplicate and compare with 0
                <m                      #   if >0 recursively call this macro again
                   dsmx                 # duplicate macro, store in register m and execute
                       k                # discard left-over 0
                        lix             # load input string and execute as macro
                           z            # get stack length
                            ll-         # load string length and subract
                               2%       # mod 2 (result is -ve because difference is -ve)
                                 B*     # multiply by 11 ('y' - 'n')
                                   C1+  # add 121 ('y')
                                      P # print result as ASCII char

Try it online!