#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;
}