Write to the agent now saying that you are withdrawing your written offer.
...Then if it was me I'd probably comment on why it wasn't disclosed that it was under offer before you'd drawn up the offer.
Then at the end of the matter (whether you get the property or not) I'd probably report...