#include <iostream>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s; // it would work only if there are no spaces between the terms
istringstream iss(s);
double coeff;
char x, sym;
int degree;
vector<double> coefficients;
while (iss >> coeff >> x >> sym >> degree) {
// you should also check if degree < 0...
if (degree >= coefficients.size()) {
coefficients.insert(coefficients.end(), degree - coefficients.size(), 0.0);
coefficients.push_back(coeff);
}
else
coefficients[degree] = coeff;
}
for (size_t i = 0; i < coefficients.size(); ++i)
std::cout << ' ' << coefficients[i];
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCXN0cmluZyBzOwoJY2luID4+IHM7ICAvLyBpdCB3b3VsZCB3b3JrIG9ubHkgaWYgdGhlcmUgYXJlIG5vIHNwYWNlcyBiZXR3ZWVuIHRoZSB0ZXJtcwoJaXN0cmluZ3N0cmVhbSBpc3Mocyk7Cglkb3VibGUgY29lZmY7CgljaGFyIHgsIHN5bTsKCWludCBkZWdyZWU7Cgl2ZWN0b3I8ZG91YmxlPiBjb2VmZmljaWVudHM7Cgl3aGlsZSAoaXNzID4+IGNvZWZmID4+IHggPj4gc3ltID4+IGRlZ3JlZSkgewoJCS8vIHlvdSBzaG91bGQgYWxzbyBjaGVjayBpZiBkZWdyZWUgPCAwLi4uIAoJCWlmIChkZWdyZWUgPj0gY29lZmZpY2llbnRzLnNpemUoKSkgewoJCQljb2VmZmljaWVudHMuaW5zZXJ0KGNvZWZmaWNpZW50cy5lbmQoKSwgZGVncmVlIC0gY29lZmZpY2llbnRzLnNpemUoKSwgMC4wKTsKCQkJY29lZmZpY2llbnRzLnB1c2hfYmFjayhjb2VmZik7CgkJfQoJCWVsc2UKCQkJY29lZmZpY2llbnRzW2RlZ3JlZV0gPSBjb2VmZjsKCX0KCglmb3IgKHNpemVfdCBpID0gMDsgaSA8IGNvZWZmaWNpZW50cy5zaXplKCk7ICsraSkKCQlzdGQ6OmNvdXQgPDwgJyAnIDw8IGNvZWZmaWNpZW50c1tpXTsKfQ==