The Nim hole will go live in approximately 47 hours. Why not try and solve it ahead of time?
Gray Code Encoder in all languages in chars.