#include <iostream>
#include <sstream>
#include <tuple>
template<typename T, typename CharT>
T extract(std::basic_istream<CharT>& is) {
T val;
is >> val;
return val;
}
void print(const std::tuple<int, long, double>& t) {
using std::cout;
cout << std::get<0>(t) << " " << std::get<1>(t) << " " << std::get<2>(t) << std::endl;
}
int main()
{
std::stringstream ss1;
std::stringstream ss2;
ss1 << 1 << " " << 2 << " " << 3;
ss2 << 1 << " " << 2 << " " << 3;
auto compilerOrder = std::tuple<int, long, double>( extract<int>(ss1), extract<long>(ss1), extract<double>(ss1) );
auto leftToRightOrder = std::tuple<int, long, double>{ extract<int>(ss2), extract<long>(ss2), extract<double>(ss2) };
print(compilerOrder);
print(leftToRightOrder);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHR1cGxlPgoKdGVtcGxhdGU8dHlwZW5hbWUgVCwgdHlwZW5hbWUgQ2hhclQ+ClQgZXh0cmFjdChzdGQ6OmJhc2ljX2lzdHJlYW08Q2hhclQ+JiBpcykgewogICAgVCB2YWw7CiAgICBpcyA+PiB2YWw7CiAgICByZXR1cm4gdmFsOwp9Cgp2b2lkIHByaW50KGNvbnN0IHN0ZDo6dHVwbGU8aW50LCBsb25nLCBkb3VibGU+JiB0KSB7CiAgICB1c2luZyBzdGQ6OmNvdXQ7CiAgICBjb3V0IDw8IHN0ZDo6Z2V0PDA+KHQpIDw8ICIgIiA8PCBzdGQ6OmdldDwxPih0KSA8PCAiICIgPDwgc3RkOjpnZXQ8Mj4odCkgPDwgc3RkOjplbmRsOwp9CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6c3RyaW5nc3RyZWFtIHNzMTsKICAgIHN0ZDo6c3RyaW5nc3RyZWFtIHNzMjsKICAgIHNzMSA8PCAxIDw8ICIgIiA8PCAyIDw8ICIgIiA8PCAzOwogICAgc3MyIDw8IDEgPDwgIiAiIDw8IDIgPDwgIiAiIDw8IDM7CiAgICBhdXRvIGNvbXBpbGVyT3J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