Editorial
By flipping all qubits, you can gain a clearer perspective on this problem.
In other words, by applying an gate to every qubit, we obtain
In this case, since each bit of becomes , we have .
Therefore, the transformation can be rewritten as
You can solve this problem by applying an oracle that adds to the quantum state. For details on how to implement this oracle, see the QPC004 A5 Editorial.
The circuit diagram for is as follows.

The circuit depth is .
Sample Code
Below is a sample program:
from qiskit import QuantumCircuit
def solve(n: int) -> QuantumCircuit:
qc = QuantumCircuit(n)
qc.x(range(n))
for i in reversed(range(1, n)):
qc.mcx(list(range(i)), i)
qc.x(0)
return qc