#include #include #include #include using namespace std; typedef long long LL; int main() { int N, M; string founder, claimant, bestClaimant; map blood; cin >> N >> M >> founder; blood[founder] = 1LL<<50; vector c(N), p1(N), p2(N); for(int i=0;i> c[i] >> p1[i] >> p2[i]; for(int i=0;i> claimant; if (blood[claimant] > best) { best = blood[claimant]; bestClaimant = claimant; } } cout << bestClaimant << endl; return 0; }