var a:array[1..10000]of longint;
    i,x:longint;

procedure qsort( l , r : longint );
var
	i , j , k , y : longint;

begin
 i := l;
 j := r;
 k := a[ ( l + r ) div 2 ];
 repeat
  while a[ i ] < k do
   inc( i );
  while a[ j ] > k do
   dec( j );
  if i <= j then
   begin
    y := a[ i ];
    a[ i ] := a[ j ];
    a[ j ] := y;
    inc( i );
    dec( j );
   end;
 until i > j;
 if i < r then
  qsort( i , r );
 if l < j then
  qsort( l , j );
end;
begin
assign(input,'G.in');
reset(input);
assign(output,'G.out');
rewrite(output);
randomize;
x:=random(10000);
for i := 1 to x do
a[i]:=random(x);
qsort(1,x);
write('TOO MANY');
close(output);
end.
