n-ary gray codes of radix k