#include<bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n-1); i >= 0; i--)
#define all(v) (v).begin(),(v).end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <class T> T lcm(T a, T b) { return a/gcd(a,b)*b; }
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const ll MOD = 1e9+7;


int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
	int t;
	cin >> t;
    rep(ti, t) {
        ll n;
        cin >> n;
        if (n%4==0) cout << "Even" << endl;
        else if (n%2==0) cout << "Same" <<endl;
        else cout << "Odd" << endl;
    }
	return 0;
}

#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef vector <vector <int>> vvi;
typedef vector <vll> vvll;
typedef map<int, int> mi;
typedef map<string, int> ms;
typedef map<char, int> mc;
typedef map <int, bool> mb;
typedef map<ll, ll> mll;
typedef unordered_map<int, int> umi;
typedef unordered_map<string, int> ums;
typedef unordered_map<char, int> umc;
typedef unordered_map <int, bool> umb;
typedef unordered_map<ll, ll> umll;
typedef vector <ld> vld;
typedef vector <bool> vb;
typedef pair <int, int> pii;
typedef pair<ll, ll> pll;
typedef vector <pii> vpii;
typedef vector <pll> vpll;
#define FOR(i,N) for(ll i = 0 ; i < N;i++)
#define eFOR(i,a,b) for(ll i = a; i <=b;i++)
#define dFOR(i,N) for(ll i = N - 1; i>=0;i--)
#define edFOR(i,b,a) for(ll i = b ; i >=a;i--)
#define all(x) x.begin(),x.end()
#define SORT(x) sort(all(x))
#define RSORT(x) sort(x.rbegin(),x.rend())
#define UNQ(x)  unique(all(x))
#define mine(x) min_element(all(x))
#define maxe(x) max_element(all(x))
#define lb(v, x) lower_bound(all(v) , x)
#define ub(v , x) upper_bound(all(v) , x)
#define pb push_back
#define FIX cout << fixed << setprecision(15)
#define g(i , a) get<i>(a)
const long double PI = 3.141592653589793;
const ll mod = 3628800;
int CASE = 1;
const int mxn = 2e5 + 1;
const ll infll = 1e18;
const int infi = 1e9;
bool prime(int n)
{
	if (n <= 1)
		return false;
	if (n == 2 or n == 3)
		return true;
	if (n % 2 == 0 or n % 3 == 0)
		return false;
	for (int i = 5; i * i <= n; i += 6)
		if (n % i == 0 || n % (i + 2) == 0)
			return false;
	return true;
}
ll __gcd(ll a, ll b)
{
	return !b ? a : __gcd(b, a % b);
}
ll power(ll a, ll b ,ll MOD)
{
	ll x = a, res = 1, p = b;
	while (p > 0)
	{
		if (p & 1)
			res *= x;
		x *= x;
		res %= MOD;
		x %= MOD;
		p >>= 1;
	}
	return res;
}
ll factorial(ll n)
{
	ll f = 1;
	eFOR(i, 1, n)
		f *= i, f %= mod;
	return f;
}
void solve()
{
	mi mp;
	int n;
	cin >> n;
	vi v(n);
	FOR(i, n)
		cin >> v[i], mp[v[i]]++;
	SORT(v);
	int x = n - mp[v[0]];
	ll ans = x;
	int p = v[0];
	eFOR(i, 1, n - 1)
	{
		if (v[i] == p)
		{
			ans += x;
		}
		else
		{
			x -= mp[v[i]];
			p = v[i];
			ans += x;
		}
	}
	cout << ans;
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int T = 1;
	while (T--)
	{
		solve();
	}
	return 0;
}
