Buffalo graduates get $10 million gift from New York State