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

### Instruction:
What is the average long that has 1581 as a gain, with a loss less than 308?

### Inputs:
table_name: table, columns: ['Name', 'Gain', 'Loss', 'Long', 'Avg/G']

### Response:
SELECT AVG Long FROM table WHERE Gain = 1581 AND Loss < 308