// общий код
var a:array [1..10] of integer;
i,max:integer;
begin
// вводим числа
for i:=low(a) to high (a) do
readln(a[i]);
// 67
// находим максимальное
max:=a[low(a)];
for i:=low(a) to high (a) do
if a[i] >max then max :=a[i];
for i:=low(a) to high (a) do
if a[i] =max then a[i]:=0;
//7
for i:=low(a) to high (a) do
if a[i] ≤10 then writeln (a[i]);
//17
for i:=low(a) to high (a) do
if a[i] <>0 then a[i]:=a[i]-high(a[i]);
end.