#include #include using namespace std; int main(){ int t; cin>>t; for(int i=0;i>n; for(int j=0;j>aj; ret=ret*aj+ret+aj; } cout<