import std.algorithm;
import std.stdio;
class Tag {
public:
this ()
{
// empty
}
string text () pure nothrow @safe
{
if (this.childs_) {
return reduce! ((a, b) => a ~ b.text () ) ("", this.childs_);
}
else {
return text_;
}
}
immutable auto childs ()
{
return this.childs_;
}
private:
Tag[] childs_;
string text_;
}
int main() {
return 0;
}
aW1wb3J0IHN0ZC5hbGdvcml0aG07CmltcG9ydCBzdGQuc3RkaW87CgpjbGFzcyBUYWcgewpwdWJsaWM6CgogICAgdGhpcyAoKQogICAgewogICAgICAgIC8vIGVtcHR5CiAgICB9CgogICAgc3RyaW5nIHRleHQgKCkgcHVyZSBub3Rocm93IEBzYWZlCiAgICB7CiAgICAgICAgaWYgKHRoaXMuY2hpbGRzXykgewogICAgICAgICAgICByZXR1cm4gcmVkdWNlISAoKGEsIGIpID0+IGEgfiBiLnRleHQgKCkgKSAoIiIsIHRoaXMuY2hpbGRzXyk7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGV4dF87CiAgICAgICAgfQogICAgfQoKICAgIGltbXV0YWJsZSBhdXRvIGNoaWxkcyAoKQogICAgewogICAgICAgIHJldHVybiB0aGlzLmNoaWxkc187CiAgICB9Cgpwcml2YXRlOgogICAgVGFnW10gY2hpbGRzXzsKICAgIHN0cmluZyB0ZXh0XzsKfQoKaW50IG1haW4oKSB7CiAgICByZXR1cm4gMDsKfQ==