#include <iostream>
#include <locale>
struct threes : std::numpunct<char>
{
std::string do_grouping() const { return "\3"; }
};
int main()
{
std::cout.imbue(std::locale(std::cout.getloc(), new threes));
std::cout << 123456789 << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bG9jYWxlPgoKc3RydWN0IHRocmVlcyA6IHN0ZDo6bnVtcHVuY3Q8Y2hhcj4KewogICAgc3RkOjpzdHJpbmcgZG9fZ3JvdXBpbmcoKSBjb25zdCB7IHJldHVybiAiXDMiOyB9Cn07CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6Y291dC5pbWJ1ZShzdGQ6OmxvY2FsZShzdGQ6OmNvdXQuZ2V0bG9jKCksIG5ldyB0aHJlZXMpKTsKICAgIHN0ZDo6Y291dCA8PCAxMjM0NTY3ODkgPDwgJ1xuJzsKfQo=