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

### Instruction:
Which District has a First elected of 1858, and a Result of retired republican gain, and an Incumbent of william millward?

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

### Response:
SELECT District FROM table WHERE First elected = 1858 AND Result = retired republican gain AND Incumbent = william millward