#include <iostream>
using namespace std;
int v[100], n, x, m, i, st, dr, mij, t;
int main() {
cin >> n;
cin >> x;
for(i=1; i<=n; i++)
cin >> v[i];
st = 1;
dr = n;
cin >> t;
for(i=1; i<=t; i++){
cin >> x;
while(st <= dr) {
mij = (st + dr) / 2;
if (v[mij] == x) {
cout << "gasit"; return 0;
}
if (v[mij] < x) st = mij;
if (v[mij] > x) dr = mij;
}
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgoKaW50IHZbMTAwXSwgbiwgeCwgbSwgaSwgc3QsIGRyLCBtaWosIHQ7CgoKaW50IG1haW4oKSB7CiAgICBjaW4gPj4gbjsKICAgIGNpbiA+PiB4OwogICAgZm9yKGk9MTsgaTw9bjsgaSsrKQogICAgICAgIGNpbiA+PiB2W2ldOwoKCiAgICBzdCA9IDE7CiAgICBkciA9IG47CiAgIAogICAgY2luID4+IHQ7CiAgICBmb3IoaT0xOyBpPD10OyBpKyspewogICAgICAgIGNpbiA+PiB4OwogICAgICAgIHdoaWxlKHN0IDw9IGRyKSB7CiAgICAgICAgICAgIG1paiA9IChzdCArIGRyKSAvIDI7CiAgICAgICAgICAgIGlmICh2W21pal0gPT0geCkgewogICAgICAgICAgICAgICAgY291dCA8PCAiZ2FzaXQiOyByZXR1cm4gMDsKICAgICAgICAgICAgfQogICAgICAgIGlmICh2W21pal0gPCB4KSBzdCA9IG1pajsKICAgICAgICBpZiAodlttaWpdID4geCkgZHIgPSBtaWo7CiAgICAgICAgfQogICAgfQp9Cgo=