CHeck for Grey codes