The right one

Oops, the last one was the version that doesn't run in the console. This
one can be run in the console