#include <bits/stdc++.h>
#include <algorithm>
#include <string.h>
using namespace std;
#define MOD (1000000000+7)
#define alp "abcdefghijklmnopqrstuvwxyz"
#define for0(i,n) for(long long i = 0;i < n;i++)
#define for01(i,n) for(long long i = 0;i <= n;i++)
#define for1(i,n) for(long long i = 1;i < n;i++)
#define for11(i,n) for(long long i = 1;i <= n;i++)
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<vector<int> > 
#define vb vector<bool>
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define test int T; cin>>T;
#define uset unordered_set
#define umultiset unordered_multiset
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
void no(){cout << "NO\n";}
void yes(){cout << "YES\n";}
bool sortbysec(const pair<int,int> &a, const pair<int,int> &b) {return (a.second < b.second);} 
bool sortpairdif(const pair<int,int> &a, const pair<int,int> &b) {if(a.first == b.first) return a.second > b.second; return a.first < b.first;} 
ll llgcd(ll a, ll b){if (a == 0) return b; return llgcd(b % a, a);} 
int igcd(int a, int b){if (a == 0) return b; return igcd(b % a, a);}
 

 
 
 
int main(){
	
	cin.tie(0); ios::sync_with_stdio(0);
	
	test;
	ull n;
	while(T--){
		cin >> n;
		if(n % 4 == 0){
			cout << "Even\n";
		}else if(n % 2 == 0){
			cout << "Same\n";
		}else{
			cout << "Odd\n";
		}


	}


 
    return 0;
}
//#include <tourist>
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;

typedef pair<ll, ll> p;
const int INF = 1e9;
const double eps = 1e-7;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
const long double pi = 4 * atan(1);
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v)          \
    cout << #v << ":";    \
    for (auto x : v)      \
    {                     \
        cout << x << ' '; \
    }                     \
    cout << endl;
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 <typename T>
istream &operator>>(istream &is, vector<T> &v)
{
    for (T &x : v)
        is >> x;
    return is;
}
//cout<<fixed<<setprecision(15);有効数字15桁
//-std=c++14
//g++ yarudake.cpp -std=c++17 -I .
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

ll calc(string a, string b)
{
    ll a_int = stoi(a);
    ll b_int = stoi(b);
    return b_int - a_int;
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n, k;
    string s;
    cin >> s >> k;
    rep(i, k)
    {
        sort(ALL(s));
        string s_min = s;
        
        reverse(ALL(s));
        
        string s_max = s;
        ll r = calc(s_min, s_max);
        s = to_string(r);
        
    }
    cout << s << "\n";
}
