Borel-Weil-Bott theory on the moduli stack of G-bundles over a curve