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_2668401_17 (party VARCHAR, district VARCHAR, result VARCHAR, first_elected VARCHAR)
  ### Question:
  What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?
  ### Answer:
  SELECT party FROM table_2668401_17 WHERE result = "Re-elected" AND first_elected = "1797" AND district = "Virginia 5"