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

### Instruction:
When did the king who entered office in 1012 leave office?

### Inputs:
table_name: table, columns: ['Throne Name', 'Title', 'Born-Died', 'Entered office', 'Left office', 'Family Relations']

### Response:
SELECT Left office FROM table WHERE Entered office = 1012