Nikkei extends gains to 3-month high as appetite for risk grows