#include <bits/stdc++.h>

template <typename ... Tail> class Tuple;

template<> class Tuple<> {};

template <typename Value, typename ... Tail>
class Tuple<Value, Tail ...> : Tuple<Tail ...> {
    Value Val;
public:
    Tuple() {}
    Tuple(Value value, Tail ... tail) : Val(value), Tuple<Tail ...>(tail ...) {}
    Value value() { return Val; }
    Tuple<Tail ...> next() { return *this; }
};

int main() {
    Tuple<char, double, std::string> tuple('1', 1.5, "Hello World");
    std::cout << tuple.value() << std::endl;
    std::cout << tuple.next().value() << std::endl;
    std::cout << tuple.next().next().value() << std::endl;
    return 0;
}