#include #define PB push_back #define MP make_pair #define REP(i,n) for (int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; const int INF=1e9; const int MOD=100000; int B=1000000; int main(){ string s[2]; char c[2]; int p[2]; REP(i,2)cin>>s[i]>>p[i]>>c[i]; if(p[0]>p[1]){ cout<p[0]){ cout<