Easy. You just get a divider device and fill your tank with H2O and the divider device pulls the H2 out and you just got some O left.
I see your sense of logic.
Go go a little further, it’s also quite safe. When hydrogen burns, it reforms with oxygen and creates water. Therefore, the fire is self extinguishing. Very safe.
Same goes in the engine combustion chamber. Funnel that new water from the exhaust back into the fuel tank, and we have perpetual motion. It’s all clean, cheap and environmentally friendly.
Isn’t it great to think like rocket scientists? Or should I say climate scientists?