human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: District, Name, Party, Residence, Assumed office, Next election
###Question: What is the party of the Senator in District A, who assumed office before 2013 and will be up for re-election after 2014?
gpt
SELECT Party FROM table WHERE Next election > 2014 AND Assumed office < 2013 AND District = a