In a language APPLE is written as DSSOH. MANGO is written as

Each letter in the word is moved three steps forward to obtain

the corresponding letter of the code.