Decrypting Caesar Cipher and String Rewriting