Editorial
You can solve this problem by using the swap gate implemented in problem A2.
Let's consider the following example of qubits:

First, swap the second and third qubits.
Next, swap the first and second qubits.
As a result, the quantum state can be obtained by two swaps.
By generalizing the above operation, the quantum state can be generated by swaps. Since each swap can be implemented with a depth quantum circuit, the depth of the entire quantum circuit is , allowing you to solve this problem.
Sample Code
Below is a sample program:
from qiskit import QuantumCircuit
def solve(n: int) -> QuantumCircuit:
def swap(n: int, qubit1: int, qubit2: int) -> QuantumCircuit:
qc = QuantumCircuit(n)
qc.cx(qubit1, qubit2)
qc.cx(qubit2, qubit1)
qc.cx(qubit1, qubit2)
return qc
qc = QuantumCircuit(n)
for i in reversed(range(n - 1)):
qc.compose(swap(n, i, i + 1), inplace=True)
return qc
Follow-up
After the contest, a solution with a circuit depth of was discovered by hiryuN (tweet). This algorithm is derived by reinterpreting the algorithm for A4: Cyclic Shift Oracle, which transforms , as an operation that replaces the -th bit with the -th bit.