'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.z(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.z(0)
    qc.x(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc

if __name__ == "__main__":
    qc = solve()
    print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit
# from qiskit.quantum_info import Statevector
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc

# if __name__ == "__main__":
#     qc = solve()
#     print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.y(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply the Z gate to create the state -|0>
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply the Z gate to create the state -|0>
    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h()
    qc.x()
    qc.h()
    qc.x
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.h(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.h(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    # Apply PauliX gate and PauliZ gate to the 1st qubit (index 0)
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.g(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply the Z gate to the qubit
    qc.z(0)  # This will effectively prepare the state -|0>

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply the Z gate to the qubit
    qc.x(0)
    qc.z(0)  # This will effectively prepare the state -|0>
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.global_phase = pi
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc = -qc
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(2 * math.PI, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(2 * math.pi, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)

    # Flip the qubit to |1⟩
    qc.x(0)

    # Apply phase shift of π
    qc.z(0)

    # Flip the qubit back to |0⟩
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(np.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(np.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0, 0, np.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.z(0)
    qc.x(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(np.pi, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(np.pi, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(np.pi, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    import numpy as np
    # Write your code here:
    qc.rx(np.pi, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.z(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.X(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x[0]
    qc.z[0]
    qc.x[0]
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc0=qc = QuantumCircuit(q)
    qc.x[0]
    qc.z[0]
    qc.x[0]
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc0=QuantumCircuit(q)
    qc0.x[0]
    qc0.z[0]
    qc0.x[0]
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.z(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0);
    qc.h(0);
    qc.cx(0, 1);
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    # Apply Hadamard gate to the first qubit to create superposition
    qc.h(0)

    # Apply CNOT gate with control qubit 0 and target qubit 1
    qc.cx(0, 1)

    # Apply Z gate to the first qubit to introduce phase difference
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    # qc.cx(control qubit, target qubit)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0,1)
    qc.cz(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    # qc.cx(control qubit, target qubit)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.cx(0, 1)
    qc.z(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h([0,1])
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(1)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(1)
    qc.h([0, 1])
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.z(0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.x(1)
    qc.z(1)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(1)
    qc.z(1)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.x(0)
    qc.z(0)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.x(1)
    qc.z(1)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.h(1)
    qc.x(0)
    qc.z(0)
    qc.x(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.x(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np
# from qiskit.quantum_info import Statevector

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc

# if __name__ == "__main__":
#     qc = solve()
#     print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z([0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h([0, 1])
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
import math
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc

# if __name__ == "__main__":
#     from qiskit.quantum_info import Statevector
#     import numpy as np
#     import random
#     qc = solve()
#     sv = Statevector(qc)
# #     sv = Statevector.from_label('+++')
# #     print(sv.evolve(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0,1)

    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qx.cx(0,1)
    qc.cz(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.cz(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cnot(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
import math
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.circuit.library.standard_gates import (
    C3XGate,
    C3SXGate,
    C4XGate,
    CCXGate,
    DCXGate,
    CHGate,
    CPhaseGate,
    CRXGate,
    CRYGate,
    CRZGate,
    CSwapGate,
    CSXGate,
    CUGate,
    CU1Gate,
    CU3Gate,
    CXGate,
    CYGate,
    CZGate,
    CCZGate,
    HGate,
    IGate,
    MCPhaseGate,
    PhaseGate,
    RCCXGate,
    RC3XGate,
    RXGate,
    RXXGate,
    RYGate,
    RYYGate,
    RZGate,
    RZZGate,
    RZXGate,
    XXMinusYYGate,
    XXPlusYYGate,
    ECRGate,
    SGate,
    SdgGate,
    CSGate,
    CSdgGate,
    SwapGate,
    iSwapGate,
    SXGate,
    SXdgGate,
    TGate,
    TdgGate,
    UGate,
    U1Gate,
    U2Gate,
    U3Gate,
    XGate,
    YGate,
    ZGate,
)

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
	qc = QuantumCircuit(2)
	qc.x(0)
	qc.h(0)
	qc.cx(0, 1)
	return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.cx(0,1)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cnot(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.z(0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    for i in range(2):
        qc.x(i)
    qc.h(0)
    qc.x(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    for i in range(2):
        qc.x(i)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(1)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(n_bits)
    qc.h(0)
    m = 0
    while 1 << m < n_bits: m += 1
    for k in range(m):
        d = 1 << k
        for i in range(d):
            if i + d < n_bits: qc.cx(i, i + d)
    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.dcx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.z(1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.p(pi, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.p(math.pi, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:]
     qc.x(0)
     qc.h(1)
     qc.cz(0, 1)
     qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:]
     qc.x(0)
     qc.h(1)
     qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:]
     qc.x(1)
     qc.h(0)
     qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:]
     qc.x(0)
     qc.h(0)
     qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:]
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.cx(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.c(0,1)
    qc.append(ZGate().control(1), range(2))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.c(0,1)
    qc.append(ZGate().control(1), range(2))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.c(0,1)
    qc.append(ZGate().control(0))
    qc.append(ZGate().control(1))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.c(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.c(0,1)
    for i in range(2):
        qc.append(ZGate().control(i-1))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.c(0,1)
    qc.append(ZGate().control(0))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(1)
    qc.h(1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    # Step 1: Apply Hadamard gate to the first qubit
    qc.h(0)

    # Step 2: Apply CNOT gate with the first qubit as control and second as target
    qc.cx(0, 1)

    # Step 3: Apply Z gate to the first qubit to introduce the phase
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    # Write your code here:
    # |->

    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    #
    # |->
    # |0>

    qc.cnot(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    # Write your code here:
    # |->

    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    #
    # |->
    # |0>
    qc.cx(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    # Write your code here:
    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    qc.c(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit,QuantumRegister

def solve() -> QuantumCircuit:
    # Write your code here:
    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    qc.c(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit,QuantumRegister

def solve() -> QuantumCircuit:
    # Write your code here:
    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    qc.cnot(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit,QuantumRegister

def solve() -> QuantumCircuit:
    # Write your code here:
    qc = QuantumCircuit(2)
    q = QuantumRegister(2,'q')
    qc.x(q[0])
    qc.h(q[0])
    qc.cx(q[0],q[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import numpy as np
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    qc.h(0) # 1/sqrt(2) * (|00> + |10>)
    qc.cx(0, 1) # 1/sqrt(2) * (|00> + |11>)
    qc.x(0) # |01> - |10>
    qc.h(0) # 1/sqrt(2) * (|01> - |11>)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    qc.h(0) # 1/sqrt(2) * (|00> + |10>)
    qc.cx(0, 1) # 1/sqrt(2) * (|00> + |11>)
    qc.h(0) # 1/sqrt(2) * (|01> - |11>)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    qc.h(0) # 1/sqrt(2) * (|00> + |10>)
    qc.cx(0, 1) # 1/sqrt(2) * (|00> + |11>)
    qc.z(1) # 1/sqrt(2) * (|00> - |11>)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i = (n_bits-1).bit_length

    for k in range(i):
        d = 2**k
        for b in range(d):
            if b+d < n_bits:
                qc.cx(b,b+d)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i = (n_bits-1).bit_length

    for k in range(i):
        d = 2**k
        for b in range(d):
            if b+d < n_bits:
                qc.cx(b,b+d)

    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i=0
    i = (n_bits-1).bit_length

    for k in range(i):
        d = pow(2,k)
        for b in range(d):
            if b+d < n_bits:
                qc.cx(b,b+d)

    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i=0
    i = 1<<i<n_bits:i+=1

    for k in range(i):
        d = pow(2,k)
        for b in range(d):
            if b+d < n_bits:
                qc.cx(b,b+d)

    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i=0
    i = 1<<i<n_bits:+=1

    for k in range(i):
        d = 1<<k
        for b in range(d):
            if b+d < n_bits:qc.cx(b,b+d)
    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def get_ghz_circuit(n_bits: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    #Calculate i using bit length
    i=0
    while 1<<i<n_bits:
        i+=1

    for k in range(i):
        d = 1<<k
        for b in range(d):
            if b+d < n_bits:qc.cx(b,b+d)
    return qc

def solve() -> QuantumCircuit:
    qc = get_ghz_circuit(2)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.x(1)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Apply Hadamard gate to the first qubit
    qc.h(0)
    # Apply Controlled-Z gate to the qubits
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Apply Hadamard gate to the first qubit
    qc.h(0)
    # Apply CNOT gate (control=0, target=1)
    qc.cx(0, 1)
    # Apply Z gate to the second qubit to introduce a phase flip
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1, 0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cnot(0,1)
    qc.x(0)
    qc.x(1)
    qc.z(1)
    qc.x(0)
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x(0)
    qc.x(1)
    qc.z(1)
    qc.x(0)
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.cz(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.x(0)
    qc.h(0)

    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np
#from qiskit.quantum_info import Statevector

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.rxx(np.pi/2,0,1)
    qc.cp(np.pi*3/2,0,1)

    return qc

qc = solve()
print(qc)
#print(Statevector(qc)) #こことimportを消す
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(2)
    qc.h(2)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates  import GlobalPhaseGate
def solve() -> QuantumCircuit:
  qc = QuantumCircuit(2)
  qc.x(0)
  qc.h(0)
  qc.cx(0, 1)
  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.z(0)
    qc.h(1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    qc.cz(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1,0)
    qc.z(0)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.cz(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.h(1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    # Step 1: Apply Hadamard gate to the first qubit
    qc.h(0)

    # Step 2: Apply CNOT gate with qubit 0 as control and qubit 1 as target
    qc.cx(0, 1)

    # Step 3: Apply Pauli-Z gate to the first qubit to introduce the negative phase
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cnot(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(1)
    qc.h(0)
    qc.cx(0,1)
    qc.x(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.cx(1,0)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.z(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cnot(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
import numpy as np
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)

    qc.cx(control_qubit=0, target_qubit=1)
    qc.cz(control_qubit=0, target_qubit=1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)  # 00 - 10
    qc.cx(0, 1)  # 00 - 11
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)  # 00 + 10
    qc.cx(0, 1)  # 00 + 11
    qc.cz(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(i)
    qc.z(i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.z(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
import math

from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ry(-math.pi, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
# from qiskit.quantum_info import Statevector

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc

# if __name__ == "__main__":
#     qc = solve()
#     print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Apply Hadamard gate to the first qubit
    qc.h(0)

    # Apply CNOT gate with control on first qubit and target on second qubit
    qc.cx(0, 1)

    # Apply Z gate to the first qubit to introduce the minus sign
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.z(0)
    for i in range(2 - 1):
        qc.cx(0, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:

    qc.h(0)
    qc.z(0)
    for i in range(2 - 1):
        qc.cx(0, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cz(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)
    qc.draw(output='mpl')
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.rx(2*math.pi,0)
    qc.rx(2*math.pi,)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.rx(2*math.pi,0)
    qc.rx(2*math.pi,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.rx(2*math.pi,0)
    qc.rx(2*math.pi,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import mat
from qiskit.circuit.library.standard_gates.p import MCPhaseGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.rx(2*math.pi,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)

    qc.rx(2*math.pi,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x([0,1])
    qc.rx(2*math.pi,0)
    qc.rx(2*math.pi,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x([1])
    qc.rx(2*math.pi,1)
    qc.x([1])
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.x([1])
    control_rx = rx(2*math.pi,1).control(1)
    qc.append(control_rx, [0, 1])
    qc.x([1])
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    # mcz = ZGate().control(1)
    # qc.append(mcz, range(2))

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cnot(0,1)
    qc.cz(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cnot(0,1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cnot(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.cz(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.x(1)
    qc.h(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.x(1)
    qc.z(1)
    qc.x(1)
    qc.h(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.x(1)
    qc.z(1)
    qc.x(1)

    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.x(1)

    qc.h(0)
    qc.cx(0, 1)

    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Step 1: Apply Hadamard gate to the first qubit
    qc.h(0)

    # Step 2: Apply CNOT gate with qubit 0 as control and qubit 1 as target
    qc.cx(0, 1)

    # Step 3: Apply Z gate to the second qubit to introduce the negative phase
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(0, 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(i, i+1)
    qc.z()

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(i, i + 1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(i, i + 1)
    qc.z(n)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(i, i + 1)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(n):
        qc.cx(0, i)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(n):
        qc.cx(i,i+1)

    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(n-1):
        qc.cx(i,i+1)

    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n-1):
      qc.cx(0, i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    # Apply Hadamard gate to the first qubit to create superposition
    qc.h(0)

    # Apply CNOT gates to entangle the first qubit with all other qubits
    for i in range(1, n):
        qc.cx(0, i)

    # Apply Z gate to the first qubit to introduce phase difference
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(i-1, i)
    qc.z(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n-1):
        qc.cx(0,i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def prepare_state(n):
    # Step 1: Create a quantum circuit with n qubits
    qc = QuantumCircuit(n)

    # Step 2: Apply Hadamard gates to all qubits
    for qubit in range(n):
        qc.h(qubit)

    # Step 3: Apply a CNOT gate to entangle the qubits
    # We will use the first qubit as control and the last qubit as target
    qc.cx(0, n-1)

    # Step 4: Apply a phase shift to the last qubit
    qc.z(n-1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n):
    # Step 1: Create a quantum circuit with n qubits
    qc = QuantumCircuit(n)

    # Step 2: Apply Hadamard gates to all qubits
    for qubit in range(n):
        qc.h(qubit)

    # Step 3: Apply a CNOT gate to entangle the qubits
    # We will use the first qubit as control and the last qubit as target
    qc.cx(0, n-1)

    # Step 4: Apply a phase shift to the last qubit
    qc.z(n-1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    # Apply Hadamard to the first qubit
    qc.h(0)

    # Apply CNOT gates to create the |111...1> state
    for i in range(1, n):
        qc.cx(0, i)

    # The state is now |psi> = (|000...0> - |111...1>)/sqrt(2)
    # The global phase is ignored, so we don't need to apply any additional phase.

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n-1):
        qc.cx(i, i+!)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n-1):
        qc.cx(i, i+1)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)

    for i in range(n):
        qc.cx(i, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)

    for i in range(n - 1):
        qc.cx(i, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    qc.cx(0, 2)
    qc.cx(0, 3)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n):
        qc.cx(0, i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(n-1):
      qc.cx(0, i+1)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(0, n-1):
        qc.cx(i, i+1)
    qc.z(0)
    return qc
'''


'''python
import math

from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(1)
    qc.ry(-math.pi, 1)
    for i in range(n - 1):
        qc.cx(i + 1, i)

    return qc
'''


'''python
import math

from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(1)
    qc.ry(-math.pi, 1)
    for i in range(n - 1):
        qc.cx(i, i + 1)

    return qc
'''


'''python
import math

from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.ry(-math.pi, 0)
    for i in range(n - 1):
        qc.cx(i, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range (n):
        qc.h(i)
    qc.cz(0,n-1)
    qz.x(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range (n):
        qc.h(i)
    qc.cz(0,n-1)
    qc.x(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range (n):
        qc.h(i)
    for i in range(n-1):
        for j in range(i+1, n):
            qc.cz(i, j)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range (n):
        qc.h(i)
    for i in range(n-1):
        qc.cx(i, n-1)
    qc.z(n-1)
    for i in range(n-1):
        qc.cx(i, n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)

    # Apply Pauli-X gate to each qubit to flip the state from |0...0⟩ to |1...1⟩
    for i in range(n):
        qc.x(i)

    # Apply Hadamard gate to each qubit again to create the desired state
    for i in range(n):
        qc.h(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)

    # Step 2: Apply X gates to all qubits
    for i in range(n):
        qc.x(i)

    # Step 3: Apply a controlled-Z gate
    qc.h(n-1)
    qc.mcx(list(range(n-1)), n-1)
    qc.h(n-1)

    # Step 4: Apply X gates again to all qubits
    for i in range(n):
        qc.x(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)

    # Apply controlled-Z gates to all pairs of qubits
    for i in range(n-1):
        for j in range(i+1, n):
            qc.cz(i, j)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(range(n))

    # Apply a multi-controlled Z gate to introduce the necessary phase
    if n > 1:
        qc.h(n-1)
        qc.mct(list(range(n-1)), n-1)
        qc.h(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    for i in range(n):
      qc.h(i)  # Apply Hadamard gate to each qubit
    qc.x(range(1, n))  # Apply X gate to all qubits except the first one
    qc.barrier()
    qc.h(0)  # Apply Hadamard gate to the first qubit
    qc.cp(math.pi, 0, range(1, n))  # Apply multi-controlled phase gate
    qc.h(0)  # Apply Hadamard gate to the first qubit again

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, 4):
        qc.cx(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    qc.z(0)
    for i in range(n-1):
        qc.cx(i, i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n-1):
        qc.cx(i,i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    circuitEnd = False
    for i in [int(pow(2, x)) for x in range(0, 4)]:

        for j in range(i):
            if (j + i >= n):
                circuitEnd = True
                break
            qc.cx(j, j + i)
        if (circuitEnd):
            break

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    for i in range(n - 1):
        qc.cx(0, i + 1)

    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    qc.x(0)
    for i in range(n - 1):
        qc.cx(0, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)
    qc.z(0)
    for i in range(n - 1):
        qc.cx(0, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    for i in range(n - 1):
        qc.cx(0,i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
    for i in range(n):
        qc.z(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
    for i in range(n):
        for j in range(i+1, n):
            qc.cz(i,j)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    # generating ghz state with negative
    qc.h(0)
    for i in range(1, n):
        # entangle the states using cnot with 0 qubit as control
        qc.cx(0, i)
    # use z gate to phase flip the highest state
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1,n):
        qc.cx(i-1,i)

    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(n:int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n-1):
        qc.cx(i,i+1)
    qc.z(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(1,n):
        qc.cx(0,i)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(0,n-1):
        qc.cx(i,i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(0,n-1):
        qc.cx(i,i+1)

    qc.z(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    # Apply Hadamard gate to the first qubit
    qc.h(0)

    # Apply CNOT gates from the first qubit to all others
    for i in range(1, n):
        qc.cx(0, i)

    # Apply Z gate to the first qubit to introduce the minus sign
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
        qc.z(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(n)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, range(1, n))
    qc.z(0)
    return qc
'''


'''python
import math
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    return qc

# if __name__ == "__main__":
#     from qiskit.quantum_info import Statevector
#     import numpy as np
#     import random
#     qc = solve()
#     sv = Statevector(qc)
# #     sv = Statevector.from_label('+++')
# #     print(sv.evolve(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(0, n):
        qc.cx(0, 1)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(n-1):
        qc.cx(i, i + 1)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0,i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
        qc.z(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
        qc.cz(i, i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)
        qc.cz(0, i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.h(i)

    for i in range(n-1):
        qc.cz(i, i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
        qc.x(i)
        qc.h(i)

    for i in range(n-1):
        qc.cz(i, i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
  for i in range(n):
    qc.x(i)
    qc.h(i)

    for i in range(n-1):
        qc.cz(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
  for i in range(n):
    qc.x(i)
    qc.h(i)

    for i in range(n):
        qc.cz(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
      qc.x(i)
      qc.h(i)

    for i in range(n-1):
        qc.cz(i, i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  # Write your code here:
  for i in range(n):
    qc.x(i)
    qc.h(i)

  for i in range(n-1):
      qc.cz(i, i+1)

  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  # Write your code here:
  for i in range(n):
    qc.x(i)
    qc.h(i)

  for i in range(n-1):
      qc.cz(0, i+1)

  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  # Write your code here:
  for i in range(n):
    qc.z(i)
    qc.h(i)

  for i in range(n-1):
      qc.cz(0, i+1)

  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  # Write your code here:
  for i in range(n):
    qc.z(i)
    qc.h(i)

  for i in range(n-1):
      qc.cz(i, i+1)

  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  # Write your code here:
  qc.x(0)
  qc.h(0)

  for i in range(n-1):
      qc.cx(i, i+1)

  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in n:
        pc.cx(0,i)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in n:
        qc.cx(0,i)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in n:
        qc.cx(0,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in n:
        if i!=0:
            qc.cx(0,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n, 1):
        if i!=0:
            qc.cx(0,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cx(0, 2)
    qc.cx(0, 3)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for a in range(n):
        qc.cx(0,n+1)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for a in range(1, n):
        qc.cx(0,n)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for a in range(1, n):
        qc.cx(0,n+1)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for a in range(1, n):
        qc.cx(0,n)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for a in range(1, n):
        qc.cx(0,a)
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0,range(n))
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0,range(1,n))
    qc.z(0)
    return qc
'''


'''python
def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n-1):
        qc.cx(i, i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n-1):
        qc.cx(i, i+1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    qc.z(0)
    for i in range(1,n):
        qc.cx(0, i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n-1):
        qc.cx(n,n+1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n-1):
        qc.cx(i,i+1)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)

    for i in range(1, n):
        qc.cx(0, i)

    qc.cz(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(n-1):
        qc.cx(i, i+1)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    wc.h(0)
    for i in range(1, n);:
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n);:
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    c.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    for i in range(1,n):
        qc.cx(0,i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0,range(1,n))
    qc.cz(0, n-1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(n)
    qc.z(n)
    for i in range(n):
        qc.cx(n-i,n-i-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(n)
    qc.z(n)
    for i in range(n):
        qc.cx(n-i-1,n-i-2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(n)
    qc.z(n)
    for i in range(n-1):
        qc.cx(n-i-1,n-i-2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(n-1)
    qc.z(n-1)
    for i in range(n-1):
        qc.cx(n-i-1,n-i-2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    # 1/sqrt(2) * (|000...> + |100...>)
    for i in range(1,n):
        qc.cx(0, i)
    # 1/sqrt(2) * (|000...> + |111...>)
    for i in range(1,n):
        qc.z(i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    # 1/sqrt(2) * (|000...> + |100...>)
    for i in range(1,n):
        qc.cx(0, i)
    # 1/sqrt(2) * (|000...> + |111...>)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
    qc.h(i)
    qc.cx(i,i+1)
    qc.z(i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(range(n))
    qc.cx(range(n-1),range(1,n))
    qc.z(range(n))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(range(n))
    qc.cx(range(n),range(n+1))
    qc.z(range(n+1))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(range(n))
    qc.cz(range(n),range(n+1))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(range(n-1))
    qc.cx(range(n-1),range(n))
    qc.z(range(n))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(range(n))
    qc.cx(range(n-1),range(n))
    qc.z(range(n))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    for i in range(n):
    qc.h(i)
    for j in range(i+1, n):
        cx(i, j)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0, i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(n - 1):
        qc.cx(i, i + 1)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    qc.h(0)
    qc.z(0)
    for i in range(1,n):
      qc.cx(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.x(0);
    qc.h(0);
    for i in range(1, n-1):
        qc.cx(0, i);
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.x(0);
    qc.h(0);
    for i in range(1, n):
        qc.cx(0, i);
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Apply Hadamard gate to all qubits to create superposition
    qc.h(range(n))
    # Apply Z gate to flip the phase of |1...1⟩
    qc.z(range(n))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    # Step 1: Apply Hadamard gates to all qubits
    for i in range(n):
        qc.h(i)

    # Step 2: Apply X gates to all qubits
    for i in range(n):
        qc.x(i)

    # Step 3: Apply a multi-controlled Z gate
    qc.h(n-1)  # Apply Hadamard to the last qubit to transform CZ to multi-controlled Z
    qc.mcx(list(range(n-1)), n-1)  # Apply the multi-controlled X gate (equivalent to CZ in this context)
    qc.h(n-1)  # Apply Hadamard again to revert

    # Step 4: Apply X gates again to all qubits
    for i in range(n):
        qc.x(i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)

    for i in range(n - 1):
        qc.cx(i, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    qc.z(0)
    for i in range(1, n):
        qc.cx(0, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        qc.cx(0,i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    for i in range(1,n):
        qc.cx(0,i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(n - 1):
        cx(0, i + 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1, n):
        qc.cx(0,i)
    qc.z(0)
    return qc
'''