#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#ifdef _DEBUG
#define show(x)          \
	cerr << #x << " : "; \
	showVal(x)
template <typename T>
void showVal(const T &a) { cerr << a << endl; }
template <typename T>
void showVal(const vector<T> &a) {
	for (const T &v : a) cerr << v << " ";
	cerr << endl;
}
template <typename T>
void showVal(const vector<vector<T>> &a) {
	cerr << endl;
	for (const vector<T> &v : a) showVal(v);
}
#else
#define show(x)
#endif
int main() {
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	multiset<int> s = {0};
	ll sum = 0, ans = 0;
	for (int i = 0; i < n; i++) {
		int c = *s.rbegin();
		s.insert(a[i]);
		int b = *s.rbegin();
		if (c < b) ans += (b - c) * i;
		sum += a[i];
		ans += sum + b;
		show(sum);
		show(b);
		cout << ans << endl;
	}
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
//////////////////////////////////////////////////////////////////////////////
void files(){freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);}
void speed(){ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);}
int lcm(int a,int b){return (a*b)/__gcd(a,b);}
int fib(int n){return (pow(1+sqrt(5),n)-pow(1-sqrt(5),n))/(pow(2,n)*sqrt(5));}
const char* tochar(string a){return a.c_str();}
const int N = 1e5+5, M = 1e9+5;
bool used[1001];
//////////////////////////////////////////////////////////////////////////////
int main(){
	int t;cin >> t;
	while( t-- ){
		long long n; cin >> n;
		if ( !(n%2) && n%4 )cout << "Same\n";
		else{
			if( !(n%2) )cout << "Even\n";
			else cout << "Odd\n";
		}
	}
}
