Input

Black box for has the following property: if and only if with if is or a unique if

Output

Algorithm

Quantum Fourier Transform