import java.util.Scanner;
public class a003{
public static void main(String [] argv){
Scanner cin = new Scanner(System.in);
while(cin.hasNext()){
int a = cin.nextInt();
int b = cin.nextInt();
int c = cin.nextInt();
int d = cin.nextInt();
int e = cin.nextInt();
int f=d-c;
int g=e-d;
if((0<=a)|(a<=20)){
if(f==g){
System.out.println(b+" "+c+" "+d+" "+e+" "+(e+f));
}else{
System.out.println(b+" "+c+" "+d+" "+e+" "+(e*f));
}
}
}
}
}