#include <string>
#include <iostream>
#include <boost/foreach.hpp>
template<typename I>
struct subseq {
typedef typename I::iterator iterator;
typedef typename I::const_iterator const_iterator;
iterator a, b;
subseq(typename I::iterator first, typename I::iterator second) : a(first), b(second) {}
iterator begin() const { return a; }
iterator end() const { return b; }
};
int main()
{
std::string hello( "Hello, world!" );
subseq<std::string> substr(hello.begin()+1, hello.end());
BOOST_FOREACH( char ch, substr )
{
std::cout << ch;
}
return 0;
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Ym9vc3QvZm9yZWFjaC5ocHA+Cgp0ZW1wbGF0ZTx0eXBlbmFtZSBJPgpzdHJ1Y3Qgc3Vic2VxIHsKICB0eXBlZGVmIHR5cGVuYW1lIEk6Oml0ZXJhdG9yIGl0ZXJhdG9yOwogIHR5cGVkZWYgdHlwZW5hbWUgSTo6Y29uc3RfaXRlcmF0b3IgY29uc3RfaXRlcmF0b3I7CgogIGl0ZXJhdG9yIGEsIGI7CgogIHN1YnNlcSh0eXBlbmFtZSBJOjppdGVyYXRvciBmaXJzdCwgdHlwZW5hbWUgSTo6aXRlcmF0b3Igc2Vjb25kKSA6IGEoZmlyc3QpLCBiKHNlY29uZCkge30KCiAgaXRlcmF0b3IgYmVnaW4oKSBjb25zdCB7IHJldHVybiBhOyB9CiAgaXRlcmF0b3IgZW5kKCkgY29uc3QgeyByZXR1cm4gYjsgfQp9OwoKaW50IG1haW4oKQp7CiAgICBzdGQ6OnN0cmluZyBoZWxsbyggIkhlbGxvLCB3b3JsZCEiICk7CiAgICBzdWJzZXE8c3RkOjpzdHJpbmc+IHN1YnN0cihoZWxsby5iZWdpbigpKzEsIGhlbGxvLmVuZCgpKTsKCiAgICBCT09TVF9GT1JFQUNIKCBjaGFyIGNoLCBzdWJzdHIgKQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCBjaDsKICAgIH0KCiAgICByZXR1cm4gMDsKfQ==