#include <iostream>
using namespace std;
int main() {
int a,b,c,d;
cin>>a>>b>>c>>d;
if(d==2*c)
cout<<" "<< a<<" "<<b<<" "<<c<<" "<<d<<" "<<2*d;
else
cout<<" "<< a<< " "<< b<<" "<< c<< " "<< d<<" "<< d+d-c;
return 0;
}
輸入1 2 3 4
測試時是1 2 3 4 5
解答時變8 1 2 3 4