def METHOD_NAME(N, W, H=aleph0, useLeftToRight=False):
    """getNthNTuple(N, W, H) -> (x_0, x_1, ..., x_W)
    Return the N-th W-tuple, where for 0 <= x_i < H."""
    if useLeftToRight:
        elts = [None]*W
        for i in range(W):
            elts[i],N = getNthPairBounded(N, H)
        return tuple(elts)
    else:
        if W==0:
            return ()
        elif W==1:
            return (N,)
        elif W==2:
            return getNthPairBounded(N, H, H)
        else:
            LW,RW = W//2, W - (W//2)
            L,R = getNthPairBounded(N, H**LW, H**RW)
            return (METHOD_NAME(L,LW,H=H,useLeftToRight=useLeftToRight) + 
                    METHOD_NAME(R,RW,H=H,useLeftToRight=useLeftToRight))