#include <iostream>

template <int Arg>
void foo()
{
	std::cout << Arg << ' ';
}

template <int First, int... Rest>
void foo()
{
	std::cout << First << ' ';
	foo<Rest...>();
}

int main()
{
	foo<1, 2, 3>();

	return 0;
}