Schema: 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?
SQL: SELECT opponent FROM table_name_52 WHERE october < 31 AND game > 5 AND record = "2-3-1"