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_6UcUJqpy):
Determine the value of n that satisfies: 5*n + 21 = 101 Respond with an integer.

Question 1 (Question id: q_k8q6Z):
Find the value of d in the equation: 12*d + 2 = 98 Respond with an integer.

Question 2 (Question id: q_AkTNIx):
How many times does the letter "r" appear in the text: "name Fritz"? Respond with an integer.

Question 3 (Question id: q_plQDn8):
Calculate ( 9 + -7 ).



Return a JSON with each question id as a key.

Each key’s value must be an object holding an 'answer' field.
Include an 'answer_type' field (value 'string' or 'integer') for every answer object.
If the response to a question is an integer that is even, also add the field 'half_answer' to the object which contains the answer integer divided by two.
If the response to a question is a string, add a 'first_char' field containing its first character.
For last-character tasks, provide 'original_string' alongside the answer.

Now provide the result JSON using the described format.

{"ground_truth": {"q_6UcUJqpy": {"answer": 16, "answer_type": "integer", "half_answer": 8}, "q_k8q6Z": {"answer": 8, "answer_type": "integer", "half_answer": 4}, "q_AkTNIx": {"answer": 1, "answer_type": "integer"}, "q_plQDn8": {"answer": 2, "answer_type": "integer", "half_answer": 1}}}