Basic exercise for encoding and decoding a message