Here is a set of basic questions producing integer or string outputs. Answer them and format the result precisely with the JSON instructions provided:

Question 0 (Question id: q_Gf3KGR):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 4 wasps, 2 starfishs, 4 grasshoppers, 2 butterflys?
 Respond with an integer.

Question 1 (Question id: q_yy4GB):
Solve for g: 2*g - 11 = 19 Respond with an integer.

Question 2 (Question id: q_RYC9sLs):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 1 cockroach, 3 flatworms, 1 insect, 3 cows?
 Respond with an integer.

Question 3 (Question id: q_kdYuFQC):
Calculate -9 + 5 + 9.

Question 4 (Question id: q_ACdqD):
Your job is to return the last character of a string as a string. For example, the last char of "hello" is "o". Return the last character of the following string: "ways"



Produce a JSON object whose top-level keys are the question ids.

The value for each key should be an object that contains the answer in the field 'answer'. Additionally, if the task is about counting legs of animals or counting letters in a string, add the task_type field with value 'leg_counting' or 'letter_counting', respectively.
Include an 'answer_type' field (value 'string' or 'integer') for every answer object.
For even integer answers, include 'half_answer' equal to answer ÷ 2.
If the response to a question is a string, add a 'first_char' field containing its first character.
For animal-leg questions, add 'animal_types': an alphabetically-sorted list of unique animal names in singular form.

Now provide the result JSON using the described format.

{"ground_truth": {"q_Gf3KGR": {"answer": 70, "task_type": "leg_counting", "answer_type": "integer", "half_answer": 35, "animal_types": ["butterfly", "grasshopper", "starfish", "wasp"]}, "q_yy4GB": {"answer": 15, "answer_type": "integer"}, "q_RYC9sLs": {"answer": 24, "task_type": "leg_counting", "answer_type": "integer", "half_answer": 12, "animal_types": ["cockroach", "cow", "flatworm", "insect"]}, "q_kdYuFQC": {"answer": 5, "answer_type": "integer"}, "q_ACdqD": {"answer": "s", "answer_type": "string", "first_char": "s"}}}