#include <iostream>
using namespace std;
template<char... s>
struct PrintChars;
template<char head, char... tail>
struct PrintChars<head, tail...> { char h = head; PrintChars<tail...> t; };
template<>
struct PrintChars<> { char h = '\0'; };
/*
std::ostream& operator<< (std::ostream& o, const PrintChars<>&)
{
return o;
}
template<char head, char... tail>
std::ostream& operator<< (std::ostream& o, const PrintChars<head, tail...>& pc)
{
o << head << PrintChars<tail...>();
return o;
}
*/
template<char... s>
std::ostream& operator<< (std::ostream& o, const PrintChars<s...>& pc)
{
const char* str = &(pc.h);
o << str;
return o;
}
int main() {
cout << PrintChars<'f','o','o'>();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGU8Y2hhci4uLiBzPgpzdHJ1Y3QgUHJpbnRDaGFyczsKCnRlbXBsYXRlPGNoYXIgaGVhZCwgY2hhci4uLiB0YWlsPgpzdHJ1Y3QgUHJpbnRDaGFyczxoZWFkLCB0YWlsLi4uPiB7IGNoYXIgaCA9IGhlYWQ7IFByaW50Q2hhcnM8dGFpbC4uLj4gdDsgfTsKCnRlbXBsYXRlPD4Kc3RydWN0IFByaW50Q2hhcnM8PiB7IGNoYXIgaCA9ICdcMCc7IH07CgovKgpzdGQ6Om9zdHJlYW0mIG9wZXJhdG9yPDwgKHN0ZDo6b3N0cmVhbSYgbywgY29uc3QgUHJpbnRDaGFyczw+JikKewoJcmV0dXJuIG87Cn0KCnRlbXBsYXRlPGNoYXIgaGVhZCwgY2hhci4uLiB0YWlsPgpzdGQ6Om9zdHJlYW0mIG9wZXJhdG9yPDwgKHN0ZDo6b3N0cmVhbSYgbywgY29uc3QgUHJpbnRDaGFyczxoZWFkLCB0YWlsLi4uPiYgcGMpCnsKCW8gPDwgaGVhZCA8PCBQcmludENoYXJzPHRhaWwuLi4+KCk7CglyZXR1cm4gbzsKfQoqLwoKdGVtcGxhdGU8Y2hhci4uLiBzPgpzdGQ6Om9zdHJlYW0mIG9wZXJhdG9yPDwgKHN0ZDo6b3N0cmVhbSYgbywgY29uc3QgUHJpbnRDaGFyczxzLi4uPiYgcGMpCnsKCWNvbnN0IGNoYXIqIHN0ciA9ICYocGMuaCk7CglvIDw8IHN0cjsKCXJldHVybiBvOwp9CgppbnQgbWFpbigpIHsKCWNvdXQgPDwgUHJpbnRDaGFyczwnZicsJ28nLCdvJz4oKTsKCXJldHVybiAwOwp9