The topic marker particle is written は ("ha") but pronounced "wa". In the same way, the object marker particle is written を ("wo") but pronounced "o".
You can only know how to write/pronounce them if you can identify these as particles (which takes some practice when reading/listening). But if you write in latin letters with spaces in between, instead of Hiragana (and Kanji), it probably doesn't make a difference which one you write. :-)