[Cubix]Cubix, 19 bytes
.@o?A^;/|?$oqBA.UW.
[Try it online!][TIO-k0vdtrq1]Try it online!
Cubified
. @
o ?
A ^ ; / | ? $ o
q B A . U W . .
. .
. .
A^
get all the input and enter the loopo?
output the TOS of stack and test@
exit if it tests to negative/;^
reflect back, pop TOS and re-enter loop
All other commands are avoided.
Reversed
.WU.ABqo$?|/;^A?o@.
Cubified
. W
U .
A B q o $ ? | /
; ^ A ? o @ . .
. .
. .
ABq
Get all input, reverse and drop TOS to bottom of stacko$?|?
output TOS, skip the test and relect back onto test@
halt if test if negativeWUq
change lane, u-turn onto drop TOS start of loop [Cubix]: https://github.com/ETHproductions/cubix [TIO-k0vdtrq1]: https://tio.run/##Sy5Nyqz4/1/PId/eMc5av8ZeJb/QyVEvNFzv/39HJ2cXVzd3AA "Cubix – Try It Online"