/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
Scanner in
= new Scanner
(System.
in);
st.setDecimalSeparator('.');
while(in.hasNextLong()){
b=in.nextLine();
if(b.contains(" ")){
s=r + " " + s;
}
}else{
s = b +" " + s;
}
}
s.replace("\n"," ");
// System.out.println(s);
if(!r.isEmpty()){
//System.out.println(">"+r+"<");
}
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRleHQuKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoKU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJCVN0cmluZyBzID0iIjsKCQkKCQkJU3RyaW5nIGI7CgkJCURlY2ltYWxGb3JtYXRTeW1ib2xzIHN0ID0gbmV3IERlY2ltYWxGb3JtYXRTeW1ib2xzKCk7CgkJCXN0LnNldERlY2ltYWxTZXBhcmF0b3IoJy4nKTsKCQkJRGVjaW1hbEZvcm1hdCBmID0gbmV3IERlY2ltYWxGb3JtYXQoIiMsIyMjIzAuMDAwMCIsc3QpOwoJCQl3aGlsZShpbi5oYXNOZXh0TG9uZygpKXsKCQkJCQoJCQkJCQoJCQkJCgkJCQliPWluLm5leHRMaW5lKCk7CgkJCQlpZihiLmNvbnR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