PEN is written as MBK. CAT is written as

Each letter in the word is moved three steps backward to obtain the corresponding letter of the code.