text: Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
  ### Context:
  CREATE TABLE table_name_18 (tournament VARCHAR)
  ### Question:
  What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters?
  ### Answer:
  SELECT 2009 FROM table_name_18 WHERE 2012 = "a" AND 2003 = "a" AND tournament = "madrid masters"