#include <iostream>

template <int i, int j>
void fn()
{
	std::cout << "1 ";
	fn<i + 1, j>();
}

template <int j>
void fn<j, j>()
{
	std::cout << "2 ";
}

int main()
{
	fn<0, 4>();
}
