Inter beat Bologna in dramatic tie