input = "MPLCCFOMNFXGUDOUG_CFED_ANFXPHGLXB_HTOSYKG_KRMWG_PUXJMWCFQAUMZP_WIAKERYWXQQJZREZPWMWKSUOSYKOMNFLXIPASBW_NPIEP_EJDBW"

KEY = (-10, -12, -7, -8)

def convert(key, string):
    L1 = {'A':0, 'B':1, 'C':2, 'D':3, 'E':4, 'F':5, 'G':6, 'H':7, 'I':8, 'J':9, 'K':10, 'L':11, 'M':12, 'N':13, 'O':14, 'P':15, 'Q':16, 'R':17, 'S':18, 'T':19, 'U':20, 'V':21, 'W':22, 'X':23, 'Y':24, 'Z':25, '_':26}
    L2 = {v: k for k, v in L1.items()}

    res = ""
    for i in range(len(string)//2):
        x = L1[string[i*2]]
        y = L1[string[i*2+1]]
        xprime = (key[0] * x + key[1] * y) % 27
        yprime = (key[2] * x + key[3] * y) % 27
        res = res + L2[xprime] + L2[yprime]
    return res


signature = input[-4:]

table = (list(range(-26,26)), list(range(-26,26)), list(range(-26,26)), list(range(-26,26)))

for i in table[0]:
    for j in table[0]:
        for k in table[0]:
            for l in table[0]:
                key = (i,j,k,l)
                if convert(key, signature) == "ADER":
                    print(key)
                    print(convert(key, input))
