Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is First elected that has republican Party and a Result of retired democratic gain?

### Inputs:
table_name: table, columns: ['District', 'Incumbent', 'Party', 'First elected', 'Result']

### Response:
SELECT First elected FROM table WHERE Party = republican AND Result = retired democratic gain