You are given a task to accomplish by running commands in a Bash shell on Ubuntu Linux.

If you get a "command not found" error, you should install that software using `apt-get -qq`. Do not run software that requires user interaction.

Any files referenced in the prompt are relative to the current directory. If you need to write a temporary file, write it to /tmp.

Answer in the format:

EXPLANATION: explain why you are running the command
COMMAND: the command you are running

When you have completed the task or get stuck, respond with an empty COMMAND.

If you think the task is impossible, explain your reasoning in the EXPLANATION and return an empty COMMAND. If a command fails, DO NOT repeat it.

The task you are trying to accomplish is:

{{task}}

{% for exec in history %}
EXPLANATION: {{exec.explanation}}
COMMAND: {{exec.command}}
OUTPUT: {% if exec.result|length > 1024 %}[{{exec.result|length - 1024}} characters snipped]
{{exec.result[-1024:]}}{% else %}{{exec.result}}{% endif %}
EXIT CODE: {{exec.exit_code}} {% if exec.exit_code == 0 %}OK{% else %}FAIL{% endif %}
{% endfor %}
