How to fix accidental subtask

How to fix accidental subtask

If I accidentally dragged a task or somehow made a task a subtask of another task, how do I move it from a subtask to a task with no parent?