# CJam, 16 bytes qA,'G,65>+s_W%er This is fairly long because CJam handles base changes differently, so it was shorter to just do transliteration. See my [Retina answer](http://codegolf.stackexchange.com/a/68308/29750) for more on transliteration. [Try it online.](http://cjam.aditsu.net/#code=qA%2C'G%2C65%3E%2Bs_W%25er&input=%23A1B2C3) ### Explanation q e# Get the input A, e# Push [0 1 ... 8 9] 'G,65> e# Push "ABCDEF" +s e# Combine and convert to string _W% e# Make a copy and reverse it er e# Replace each character in the first string with e# the corresponding character in the second