#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e;
while(cin>>a>>b>>c>>d)
{
e=d+c-b;
if(b-a==c-b)
{
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<endl;
}
else if(e=d*c/b)
{
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<endl;
}
}
return 0;
}