Probably go insane!! Hate being cooped up!

What would you do if you found a dog/cat/animal put up fliers, made calls, all the right things to find the owner. You end up with it for a few months get really attached and then the owner contacts you?