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_52 (opponent VARCHAR, record VARCHAR, october VARCHAR, game VARCHAR)
### Question:
What is the Opponent before October 31 with a Record of 2-3-1 after Game 5?
### Answer:
SELECT opponent FROM table_name_52 WHERE october < 31 AND game > 5 AND record = "2-3-1"