CREATE TABLE table_21831229_3 (written_by VARCHAR(255), no_in_series VARCHAR(255))
Who wrote episode 31 in the series?
    
SQL: SELECT written_by FROM table_21831229_3 WHERE no_in_series = 31