Wainwright ties it up with a three-run shot