# [JavaScript (Node.js)], 257 bytes [JavaScript (Node.js)]: https://nodejs.org <!-- language-all: lang-javascript --> s=>("TKKYKGPR"[i="ATFCOMCYMMYTPRKSGSSPMSRBALAATABLRBENBIHMACESTGNBIRLISRSVNUKR".search([c]=s)/3]||c)+("FMYTPSMSXQYJAOEWELIA"[i]||s[2-Buffer(`"$#Ofv-9,[+G#J23".5)9.M'83'I!(>@@%+0/5<56%L>-0/60<2G8%AD?7^%&.:+r:+7&`).every(n=>q-=n-32,q=parseInt(s,36)*54%1601)]) [Try it online!](https://tio.run/##NVfbctxEEH3PVywLjnfxJYmNAwTWoOtIqxmtrBlps@syFZdZk1ApO/GGVFGEP6CKFx7hP/gefoBPMDp9mhcnx2qdPn26p0f@8fL95fbq7tWbdwc3t99v7q9n99vZ6WQcqmpVmaYdn7@ajaOQJwuXrJxbhaatvPG@cb6NIxtFIYptG2d1XBYuSjIfzPDf1pa@9X3dVe34cLu5vLt6OTm/uphtp4@OLz58uJruTcY5yLzzz89W82iRLTNbRkO24fH2/Ogg/un6enM3eTH@5OPF9fuDL/fP98zH86Pj8eHJ9MtDt/vF8W750eT022939h4/Ovn65OmOPT14/Ojp46@PzBc7UfrN59/tPDx8tnf3bO/zhy@mh5v3m7ufJzez07cHs5uD46P9t7M3l3fbTXnzbrLdP346/fTks50nTx8/mV5M7786f3A@jnIz3h9@ji/2B2AjgOcKYgArIF3jSbrmE@/wxBPUKUBKYBYAC4JS2EqCIOBMgSQ1BK2AVoFQO4J4CbAk6DxApyAABIJ1BkBtcYGw2CtoAQoCA6ExhcYtiotjAithK4LMAmT6ZA2g1FkNMCdwHQCFxkGeUE68EAJ6MMwLQESwhAcx64l7lBD3Kkee0IPeQFtPd8oFwkplayVPrfWIaobFuRCwjXFaAtD4qoCjFT1IHN5JqDqJwJZQW9L0AJQznAG8s9KwHE9IHRKYGGhiUqDSxCoQNmorKvS0qAQMB2YAjiUkz0UBRyxJKoCEQHxLNGwhClToAmyJUQAFiSpYCAHzJC3KT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