#include<bits/stdc++.h>
#include<iostream>
using namespace std;
#define mn 100005
#define FLN "code"
#define endl "\n"
#define fi first
#define se second
#define inf 4444444444444444444
#define mod 1000000009
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define FOR0(i, a) for (int i=0; i<(a); i++)
#define FOR1(i, a) for (int i=1; i<=(a); i++)
#define codenhanh(); ios_base::sync_with_stdio(0) ,cin.tie(0),cout.tie(0);
int n,m,b[mn],c[mn];
int dem=0;
int ttl=0;
signed main()
{
	codenhanh();
	for(int i=1;i<=8;i++)
	{
		cin>>a[i];
	}
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>b[i]>>c[i];
	}
	
	
return 0;
}
