#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int n;     cin >> n;     int ma = INT_MIN;     string ans =  nah ;     while (n--) {       string s;       int s1, s2, a, b, c, d, e;       cin >> s;       cin >> s1 >> s2 >> a >> b >> c >> d >> e;       int val = 0;       val += 100 * s1 + (-50) * s2 + a + b + c + d + e;       if (val > ma) {         ma = val;         ans = s;       }     }     cout << ans;     return 0;   }   