import java.util.*;
public class a005{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while(input.hasNext()){
int a=input.nextInt();
int b=input.nextInt();
int c=input.nextInt();
int d=input.nextInt();
float e;
if ((d-c)==(c-b) && (c-b)==(b-a)){
e=d+(d-c);
System.out.println(a+" "+b+" "+c+" "+d+" "+e);
}else if ((double)(d/c)==(double)(c/b) && (double)(c/b)==(double)(b/a)){
e=d*(d/c);
System.out.println(a+" "+b+" "+c+" "+d+" "+e);
}else{
}
}
}
}