from UserString import MutableString

def hextobin(a):
	

def solve(ahex, bhex, chex, k):
	abin = hextobin

for _ in xrange(input()):
	k = input()
	ahex = raw_input()
	bhex = raw_input()
	chex = raw_input()
	solve(ahex, bhex, chex, k)

