add previous results backward to generate correct Gray Code