/*
Jackson Simoneau
SI@UCF 2026 - Intro to Competitive Programming

Solution to https://open.kattis.com/problems/dicegame
*/

#include <bits/stdc++.h>
using namespace std;

int main() {
    int a, b, c, d;

    //Instead of computing the expected roll of each player,
    //which requires dividing by 2 (doubles and/or imprecision),
    //just store the sums without dividing
    cin >> a >> b >> c >> d;
    int s1 = a + b + c + d;

    cin >> a >> b >> c >> d;
    int s2 = a + b + c + d;

    if(s1 > s2) {
        cout << "Gunnar\n";
    } else if(s1 < s2) {
        cout << "Emma\n";
    } else {
        cout << "Tie\n";
    }
}