strs = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'


def shifttext(shift, inp):
    data = []
    for i in inp:
        data.append(strs[(strs.index(i) - shift) % 26])
    output = ''.join(data)
    return output


with open(input()) as f:
    lines = [line.strip() for line in f]
for i in range(int((len(lines) - 1) / 2) + 1):
    res = ''
    pos = int(lines[2 * i])
    for c in lines[2 * i + 1]:
        codcd = ord(c) - pos
        if codcd < ord(' '):
            codcd += 32
        res += chr(codcd)
    print(res)

1d8bfe3da275f8a2538259728c983907ab70357d
<mask token>

<mask token>


def shifttext(shift, inp):
    data = []
    for i in inp:
        data.append(strs[(strs.index(i) - shift) % 26])
    output = ''.join(data)
    return output


<mask token>

<mask token>


def shifttext(shift, inp):
    data = []
    for i in inp:
        data.append(strs[(strs.index(i) - shift) % 26])
    output = ''.join(data)
    return output


with open(input()) as f:
    lines = [line.strip() for line in f]
for i in range(int((len(lines) - 1) / 2) + 1):
    res = ''
    pos = int(lines[2 * i])
    for c in lines[2 * i + 1]:
        codcd = ord(c) - pos
        if codcd < ord(' '):
            codcd += 32
        res += chr(codcd)
    print(res)

strs = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'


def shifttext(shift, inp):
    data = []
    for i in inp:
        data.append(strs[(strs.index(i) - shift) % 26])
    output = ''.join(data)
    return output


with open(input()) as f:
    lines = [line.strip() for line in f]
for i in range(int((len(lines) - 1) / 2) + 1):
    res = ''
    pos = int(lines[2 * i])
    for c in lines[2 * i + 1]:
        codcd = ord(c) - pos
        if codcd < ord(' '):
            codcd += 32
        res += chr(codcd)
    print(res)
