program sairsodo;
const MAXN=100000;
type elenco = array[1..MaXN] of qword;
Procedure scambia (var a,b: qword);
var x:qword;
begin
x:=a;
a:=b;
b:=x;
end;
Procedure ordinamento (estremoi,estremos: qword; var v : elenco; ordinato:boolean);
var inf, sup, medio:qword;
pivot :qword;
begin
inf:=estremoi;
sup:=estremos;
medio:= (estremoi+estremos) div 2;
pivot:=v[medio];
repeat
if (ordinato) then
begin
while (v[inf]<pivot) do inf:=inf+1;
while (v[sup]>pivot) do sup:=sup-1;
end;
if inf<=sup then
begin
scambia(v[inf],v[sup]);
inf:=inf+1;
sup:=sup-1;
end;
until inf>sup;
if (estremoi<sup) then ordinamento(estremoi,sup,v,ordinato);
if (inf<estremos) then ordinamento(inf,estremos,v,ordinato);
end;
begin
readln
end.
cHJvZ3JhbSBzYWlyc29kbzsKY29uc3QgTUFYTj0xMDAwMDA7IAp0eXBlIGVsZW5jbyA9IGFycmF5WzEuLk1hWE5dIG9mIHF3b3JkOwoKUHJvY2VkdXJlIHNjYW1iaWEgKHZhciBhLGI6IHF3b3JkKTsKdmFyIHg6cXdvcmQ7CmJlZ2luCiAgIHg6PWE7CiAgIGE6PWI7CiAgIGI6PXg7CmVuZDsgIApQcm9jZWR1cmUgb3JkaW5hbWVudG8gKGVzdHJlbW9pLGVzdHJlbW9zOiBxd29yZDsgdmFyIHYgOiBlbGVuY287IG9yZGluYXRvOmJvb2xlYW4pOwp2YXIgaW5mLCBzdXAsIG1lZGlvOnF3b3JkOwogICAgcGl2b3QgOnF3b3JkOwpiZWdpbgogICAgaW5mOj1lc3RyZW1vaTsKICAgIHN1cDo9ZXN0cmVtb3M7CiAgICBtZWRpbzo9IChlc3RyZW1vaStlc3RyZW1vcykgZGl2IDI7CiAgICBwaXZvdDo9dlttZWRpb107CiAgICByZXBlYXQKICAgICAgaWYgKG9yZGluYXRvKSB0aGVuCiAgICAgICAgIGJlZ2luCiAgICAgICAgICAgIHdoaWxlICh2W2luZl08cGl2b3QpIGRvICBpbmY6PWluZ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