program ii; var s,s1:string[11]; c,code:longint; BEGIN repeat readln(s); s1:=COPY(s,1,6)+COPY(s,8,4); val(s1,c,code); if ((c mod 11)<>0) then writeln('invalid') else if ((s[3]='5')OR(s[3]='6')) then writeln('girl') else if s='end' then halt else writeln('boy'); until s='end'; end.