#include "iostream"
#include <vector>
using namespace std;
int main()
{
vector <int> a;
int n;
int max_i = 0; // номер максимального элемента
while (cin >> n)
a.push_back(n);
for (int i=0; i < a.size(); i++)
{
if (a[i] > a[max_i])
max_i=i;
}
for (int i=0; i<max_i; i++)
{
if (i % 2 != 0)
{
a[i] *= a[max_i];
}
}
for (int i = 0; i < a.size(); i++)
cout << a[i] << " ";
return 0;
}
I2luY2x1ZGUgImlvc3RyZWFtIgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkKewoJdmVjdG9yIDxpbnQ+IGE7CglpbnQgbjsKCWludCBtYXhfaSA9IDA7IC8vINC90L7QvNC10YAg0LzQsNC60YHQuNC80LDQu9GM0L3QvtCz0L4g0Y3Qu9C10LzQtdC90YLQsAoJd2hpbGUgKGNpbiA+PiBuKSAKCQlhLnB1c2hfYmFjayhuKTsgCglmb3IgKGludCBpPTA7IGkgPCBhLnNpemUoKTsgaSsrKQoJewoJCWlmIChhW2ldID4gYVttYXhfaV0pCgkJCSBtYXhfaT1pOwoJfQoJZm9yIChpbnQgaT0wOyBpPG1heF9pOyBpKyspCgl7CgkJaWYgKGkgJSAyICE9IDApCgkJewoJCQlhW2ldICo9IGFbbWF4X2ldOwkJCQoJCX0KCX0KCWZvciAoaW50IGkgPSAwOyBpIDwgYS5zaXplKCk7IGkrKykKCQljb3V0IDw8IGFbaV0gPDwgIiAiOwoJcmV0dXJuIDA7Cn0=