N-wise Reduce