Program Project1;
var
a:array[1..5] of Integer;
i, j, sum:Integer;
s:string;
begin
Readln(s);
sum:=0;
for i:=1 to 5 do
begin
if (Length(s)>=2) then
begin
j:=Pos(' ', s);
a[i]:=StrToInt(Copy(s, 1, j-1));
sum:=sum+a[i];
Delete(s, 1, j);
end
else
begin
a[i]:=StrToInt(s);
sum:=sum+a[i];
end;
end;
for i:=1 to 5 do
begin
if (a[i]<>0) then
begin
a[i]:=a[i]-sum;
Write(a[i], ' ');
end
else
begin
a[i]:=a[i];
Write(a[i], ' ');
end;
end;
end.