#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=
stdin
aW5zZXJ0IGludG8gZnJpZW5kICgKc2VsZWN0IGYxLmlkMSwgZjIuaWQyCmZyb20gZnJpZW5kIGYxLCBmcmllbmQgZjIsIGZyaWVuZCBmMwp3aGVyZSBmMS5pZDI9ZjIuaWQxCmFuZCBmMi5pZDI9ZjMuaWQxCmFuZCBmMS5pZDEgJmx0OyBmMS5pZDIKYW5kIGYyLmlkMSAmbHQ7IGYyLmlkMgphbmQgbm90IGV4aXN0cyAoCnNlbGVjdCBkLmlkMSwgZC5pZDIKZnJvbSBmcmllbmQgZAp3aGVyZSBkLmlkMT1mMS5pZDEKYW5kIGQuaWQyPWYyLmlkMikKKQo=
insert into friend (
select f1.id1, f2.id2
from friend f1, friend f2, friend f3
where f1.id2=f2.id1
and f2.id2=f3.id1
and f1.id1 < f1.id2
and f2.id1 < f2.id2
and not exists (
select d.id1, d.id2
from friend d
where d.id1=f1.id1
and d.id2=f2.id2)
)