#include <fstream>
#include <iostream>
using namespace std;
int main(){
int n, t, s1=0, s2=0, i;
ifstream f("date.in");
f>>n;
for(i=0;i<n;i++){
f>>t;
if(i%2==0) s1=s1+t;
else s2=s2+t;
}
cout<<"Jucator1="<<s1<<endl;
cout<<"Jucator2="<<s2<<endl;
if(s1>s2)cout<<"Jucatorul 1 a castigat";
else if(s1<s2)cout<<"Jucatorul 2 a castigat";
else cout<<"Remiza";
}