program remix;
Uses Sysutils;
{$H+}
const
MAXN = 100000;
var
N,i, contacaratteri: longint;
ST, nuovaST,a: Ansistring;
remixx, testo : array[0..MAXN] of char;
spazio:boolean;
procedure ripulisci(numchar: longint; var R,T: array of char);
var h,k:longint;
begin
k:=0; h:=0; spazio:=false;
while h<numchar do
if ((R[h]<>'P') or (R[h+1]<>'a') or (R[h+2]<>'H')) and ((R[h]<>'T') or (R[h+1]<>'u') or (R[h+2]<>'N') or (R[h+3]<>'Z')) then begin T[K]:=R[h]; k:=k+1; h:= h+1; spazio:=true; end
else
if ((R[h]='P') and (R[h+1]='a') and (R[h+2]='H')) then begin h:=h+3; if spazio=true then T[k]:=' '; spazio:=false; k:=k+1; end
else begin h:=h+4; if spazio=true then T[k]:=' '; spazio:=false; k:=k+1; end;
contacaratteri:=k;
end;
begin
(*assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);*)
readln(N);
readln(ST);
ST:=Trim(ST);
for i:=0 to N-1 do remixx[i]:=ST[i+1];
ripulisci(N, remixx, testo);
nuovaST:='';
for i:=0 to contacaratteri-1 do if ord(testo[i])<>0 then nuovaST:=nuovaST+testo[i];
nuovaST:=trimleft(nuovaST);
nuovaST:=trimRight(nuovaST);
writeln(nuovaST);
writeln(ord(nuovaST[7]));
end.
cHJvZ3JhbSByZW1peDsKVXNlcyBTeXN1dGlsczsKeyRIK30KY29uc3QKICAgIE1BWE4gPSAxMDAwMDA7CnZhcgogICAgTixpLCBjb250YWNhcmF0dGVyaTogbG9uZ2ludDsKICAgIFNULCBudW92YVNULGE6IEFuc2lzdHJpbmc7CiAgCiAgICByZW1peHgsIHRlc3RvICAgIDogYXJyYXlbMC4uTUFYTl0gb2YgY2hhcjsKICAgIHNwYXppbzpib29sZWFuOwoKcHJvY2VkdXJlIHJpcHVsaXNjaShudW1jaGFyOiBsb25naW50OyB2YXIgUixUOiBhcnJheSBvZiBjaGFyKTsKdmFyIGgsazpsb25naW50OwpiZWdpbgogICAgazo9MDsgaDo9MDsgc3BhemlvOj1mYWxzZTsKICAgIHdoaWxlIGg8bnVtY2hhciBkbyAKICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFJbaF08PidQJykgb3IgKFJbaCsxXTw+J2EnKSBvciAoUltoKzJdPD4nSCcpKSBhbmQgKChSW2hdPD4nVCcpIG9yIChSW2grMV08Pid1Jykgb3IgKFJbaCsyXTw+J04nKSBvciAoUltoKzNdPD4nWicpKSAgdGhlbiBiZWdpbiBUW0tdOj1SW2hdOyBrOj1rKzE7IGg6PSBoKzE7IHNwYXppbzo9dHJ1ZTsgZW5kIAogICAgICAgICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoUltoXT0nUCcpIGFuZCAoUltoKzFdPSdhJykgYW5kIChSW2grMl09J0gnKSkgdGhlbiAgYmVnaW4gaDo9aCszOyBpZiBzcGF6aW89dHJ1ZSB0aGVuIFRba106PScgJzsgc3BhemlvOj1mYWxzZTsgazo9aysxOyBlbmQgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgIGJlZ2luIGg6PWgrNDsgaWYgc3BhemlvPXRydWUgdGhlbiBUW2tdOj0nICc7IHNwYXppbzo9ZmFsc2U7IGs6PWsrMTsgZW5kOyAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgY29udGFjYXJhdHRlcmk6PWs7CmVuZDsKCmJlZ2luCiAgICAoKmFzc2lnbihpbnB1dCwgICdpbnB1dC50eHQnKTsgIHJlc2V0KGlucHV0KTsKICAgIGFzc2lnbihvdXRwdXQsICdvdXRwdXQudHh0Jyk7IHJld3JpdGUob3V0cHV0KTsqKQogICAgcmVhZGxuKE4pOwogICAgcmVhZGxuKFNUKTsKICAgIFNUOj1UcmltKFNUKTsKICAgIGZvciBpOj0wIHRvIE4tMSBkbyByZW1peHhbaV06PVNUW2krMV07IAogICAgcmlwdWxpc2NpKE4sIHJlbWl4eCwgdGVzdG8pOwogICAgbnVvdmFTVDo9Jyc7CiAgICBmb3IgaTo9MCB0byBjb250YWNhcmF0dGVyaS0xIGRvIGlmIG9yZCh0ZXN0b1tpXSk8PjAgdGhlbiBudW92YVNUOj1udW92YVNUK3Rlc3RvW2ldOwogICAgbnVvdmFTVDo9dHJpbWxlZnQobnVvdmFTVCk7CiAgICBudW92YVNUOj10cmltUmlnaHQobnVvdmFTVCk7CiAgICB3cml0ZWxuKG51b3ZhU1QpOwogICAgd3JpdGVsbihvcmQobnVvdmFTVFs3XSkpOwplbmQuCg==