You are rocking the latest breakthrough in Computer Science: animated fonts. Suddenly, all of your colleagues' code looks amazing, and you are finally motivated to review it. Unfortunately, due to the constant rotations, it is hard to distinguish between the + (plus) and the × (multiply) operators (all the other characters are still readable). The function you are reviewing takes as input n+1 integers a_0,a_1,…,a_n and returns the value (…(((a_0,op_1,a_1),op_2,a_2),op_3,a_3)…,op_n,a_n)mod109+7, where the n operators op_1,,op_2,,…,,op_n are either + or ×. For example when given input (a_0,a_1,a_2)=(1,1,2) with hidden operators (op_1,op_2)=(+,×), then the function returns ((1+1)×2)=4mod109+7.
You can still execute the function a few times on some input and read the returned value. Use this to recover the operators.