#include <bits/stdc++.h>
#include <string.h>
using namespace std;
#define ll long long
void solve(){
int n;
cin>>n;int a[n],b;cin>>a[0];
for(int i=1;i<n;i++){cin>>b;a[i]=a[i-1]+b;}
for(auto &p:a){cout<<p<<" ";}cout<<endl;}
int main() {
int t;
cin>>t;
while(t--){solve();
}return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBsbCBsb25nIGxvbmcKdm9pZCBzb2x2ZSgpewoJaW50IG47CgljaW4+Pm47aW50IGFbbl0sYjtjaW4+PmFbMF07Cglmb3IoaW50IGk9MTtpPG47aSsrKXtjaW4+PmI7YVtpXT1hW2ktMV0rYjt9Cglmb3IoYXV0byAmcDphKXtjb3V0PDxwPDwiICI7fWNvdXQ8PGVuZGw7fQoKaW50IG1haW4oKSB7CglpbnQgdDsKCWNpbj4+dDsKCXdoaWxlKHQtLSl7c29sdmUoKTsKCX1yZXR1cm4gMDsKfQ==