Code for problem "Gray Code".