he then went to france and returned to peru after the end of the pacific war