import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto n = readln.strip.to !(int);
		auto a = readln.splitter.map !(to !(int)).array;
		writeln (n * 3);
		for (int i = 1; i <= n; i += 2)
		{
			writeln (1, " ", i, " ", i + 1);
			writeln (2, " ", i, " ", i + 1);
			writeln (1, " ", i, " ", i + 1);

			writeln (1, " ", i, " ", i + 1);
			writeln (2, " ", i, " ", i + 1);
			writeln (1, " ", i, " ", i + 1);
		}
	}
}
