either way
Quickie Quick
What is the Time Frame for Transplanting Organs?
Thoracic organs, like the heart and lungs, can only remain viable for transplant after being outside the body for four to six hours.
The liver can function for up to 12 hours and kidneys for up to 36 hours.
https://www.donoralliance.org/newsroom/donation-essentials/what-is-the-time-frame-for-transplanting-organs/