You can always make an offer on another house. Assuming you checked "seller is limited to hand money... as liquidated damages" in the sales agreement (make sure you did!), worst case is you'll lose your deposit on the first house.
What is the contingency? If it is the inspection, and you've chosen option 1, you can terminate the contract without giving a reason (within the time period only, of course. If you already accepted the property condition you can't change it now). You just have to provide the licensed inspector's report, the reply to inspection form, and the release of hand money (you should get the hand money back).
If it is a financing contingency, you can't get out of that legitimately if you are indeed creditworthy (and get your hand money back, anyway).
That said, nobody can force you to buy a house! (Well, maybe a judge can under extraordinary circumstances :-) You can always terminate the contract at any time, arbitrarily. You will just lose your hand money. If you want the second house badly enough to forfeit your deposit, you may do so. (Of course, you might not get the second house, in which case you'd end up with no house at all and lose your hand money besides, so this is not without risk).
To terminate arbitrarily, you can sign an "Agreement of Sale Release and Distribution of Deposit Money" form, specifying that the hand money goes to the seller, and have them sign it. As soon as they do, the agreement is terminated and the seller will get a check from the escrow account for your deposit.
Of course, you're dealing with legal matters here, and should consult a real estate attorney for a full analysis of your situation. Good luck!