Given N, output n-th element of ['A', 'B', 'AB', 'C', 'D', 'CD', 'ABCD', 'E', ...]?
Python 2, 53 bytes



x,y=0,1
exec"x^=y-x;y+=x/y;"*input()
print range(x,y)


Try it online!

Similar to this construction with the transformation x = u-v, y = u