Buffalo man sentenced to three life sentences