#include <bits/stdc++.h>
using namespace std;
int h[105];
int main(int argc,char *argv[])
{
	long long n,k,x,s=0,w[105],stdans1,stdans2;
	freopen(argv[6],"w",stdout);
	cout<<"Error!"<<endl;
	freopen(argv[5],"w",stdout);
	cout<<0<<endl;
	freopen(argv[1],"r",stdin);
	cin>>n;
	for(int i=1; i<=n; i++) cin>>w[i];
	freopen(argv[3],"r",stdin);
	cin>>stdans1>>stdans2;
	freopen(argv[2],"r",stdin);
	cin>>k;
	if (k!=n/2&&k!=n-n/2) return 0;
	for(int i=1; i<=k; i++)
	{
		cin>>x;
		if (x<1||x>n) return 0;
		if (h[x]) return 0;
		h[x]=1;
		s+=w[x];
	}
	if (s==stdans1||s==stdans2)
	{
	   freopen(argv[6],"w",stdout);
	   cout<<"Right!"<<endl;
	   freopen(argv[5],"w",stdout);
	   cout<<10<<endl;
    }
    else
    {
       freopen(argv[6],"w",stdout);
	   cout<<"Error!"<<endl;
	   freopen(argv[5],"w",stdout);
	   cout<<0<<endl;	
	}
	return 0;
}
