#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
int main()
{
vector<int>a;
int el; //supporting variable for saving input values
while(cin >> el)
{
a.push_back(el); //adding value to the vector
}
int min = a[0];
int num = 0;
double sum = 0;
for(int i=0; i<a.size(); i++)
{
if(a[i]<=min) //finding the number of the minimal value
{
min = a[i];
num = i;
}
sum += a[i];
}
int average = floor(sum/a.size()); //calculing the average of vector elements
a[num] = average; //replacing minimal value by the average
for(int i = 0; i < a.size(); i++)
{
cout << a[i] << " ";
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNtYXRoPgojaW5jbHVkZTx2ZWN0b3I+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICB2ZWN0b3I8aW50PmE7CiAgaW50IGVsOyAvL3N1cHBvcnRpbmcgdmFyaWFibGUgZm9yIHNhdmluZyBpbnB1dCB2YWx1ZXMKICB3aGlsZShjaW4gPj4gZWwpCiAgICB7CiAgICAgIGEucHVzaF9iYWNrKGVsKTsgLy9hZGRpbmcgdmFsdWUgdG8gdGhlIHZlY3RvcgogICAgfQogIGludCBtaW4gPSBhWzBdOwogIGludCBudW0gPSAwOwogIGRvdWJsZSBzdW0gPSAwOwogIGZvcihpbnQgaT0wOyBpPGEuc2l6ZSgpOyBpKyspCiAgICB7CiAgICAgIGlmKGFbaV08PW1pbikgLy9maW5kaW5nIHRoZSBudW1iZXIgb2YgdGhlIG1pbmltYWwgdmFsdWUKICAgICAgICB7CiAgICAgICAgICBtaW4gPSBhW2ldOyAKICAgICAgICAgIG51bSA9IGk7CiAgICAgICAgfQogICAgICBzdW0gKz0gYVtpXTsKICAgIH0KICBpbnQgYXZlcmFnZSA9IGZsb29yKHN1bS9hLnNpemUoKSk7IC8vY2FsY3VsaW5nIHRoZSBhdmVyYWdlIG9mIHZlY3RvciBlbGVtZW50cwogIGFbbnVtXSA9IGF2ZXJhZ2U7IC8vcmVwbGFjaW5nIG1pbmltYWwgdmFsdWUgYnkgdGhlIGF2ZXJhZ2UKICBmb3IoaW50IGkgPSAwOyBpIDwgYS5zaXplKCk7IGkrKykKICAgIHsKICAgICAgY291dCA8PCBhW2ldIDw8ICIgIjsKICAgIH0KICByZXR1cm4gMDsKfQ==