Problem: Our Earth is so beautiful due to the various amazing colours it contains. Now on Earth day we invited Species from Mars (called Martian) Planet to celebrate it with us and to let them know our Earth. 
Martians got so much attracted with the beauty of our Earth and invited people of Earth to visit their Planet Mars.

But there is a problem People of Earth made a condition that Mars should have some of the Colours of Earth so only they will visit.

And this is not the only one problem as the Language spoken on Earth and Mars differs too.
So you have been assigned a task to help the Martians make the Mars as beautiful as Earth so we can visit there.

Your task is, you are given three Integers values of Colours Red, Green and Blue respectively. You are required to convert these values into Mars' language.

Language spoken on Mars is same as Hexadecimal Number Notation but instead of using starting letters of Alphabet they use ending letters.

For better understanding see the Sample Input and Sample Output.

INPUT:

First line contains integer T (number of Test Cases). Next T lines will contains three integers R, G & B values of Red, Green and Blue colour respectively.

OUTPUT :

Produce output for each Test Case in new line in the below depicted format as  Case x: y where x represents Test Case Number and y represents output for Test Case numbered x

CONSTRAINTS

1 ≤ T ≤ 25

0 ≤ R, G, B ≤ 255

Note :- To be Eligible for Prizes you have to register and create your home address maptag.

Click here to create your Maptag

SAMPLE INPUT
2
15 9 120
255 98 174

SAMPLE OUTPUT
Case 1: 0Z 09 78
Case 2: ZZ 62 UY

Explanation

For Case 1: R = 15 when divide by 16 gets remainder 15 which is represented by 'Z'. Note that in Hexadecimal 15 is represented by letter 'F'. 

The same process follows for all values of Case 1 & 2.

Solution (in PYTHON):

Solution:
t=int(raw_input())
ti=0
while ti<t:
	a,b,c=map(int,raw_input().strip().split())
	a=hex(a).split('x')[1]
	b=hex(b).split('x')[1]
	c=hex(c).split('x')[1]
	print "Case "+str((ti+1))+":",
	r=""
	i=0
	while i<len(a):
		if a[i]=='f':
			r+="Z"
		elif a[i]=='e':
			r+='Y'
		elif a[i]=='d':
			r+='X'
		elif a[i]=='c':
			r+='W'
		elif a[i]=='b':
			r+='V'
		elif a[i]=='a':
			r+='U'
		else:
			r+=a[i]
		i+=1
	if len(r)==1:
		r='0'+r
	elif len(r)<1:
		r='00'+r
	print r,
	r=""
	i=0
	while i<len(b):
		if b[i]=='f':
			r+="Z"
		elif b[i]=='e':
			r+='Y'
		elif b[i]=='d':
			r+='X'
		elif b[i]=='c':
			r+='W'
		elif b[i]=='b':
			r+='V'
		elif b[i]=='a':
			r+='U'
		else:
			r+=b[i]
		i+=1
	if len(r)==1:
		r='0'+r
	elif len(r)<1:
		r='00'+r
	print r,
	r=""
	i=0
	while i<len(c):
		if c[i]=='f':
			r+="Z"
		elif c[i]=='e':
			r+='Y'
		elif c[i]=='d':
			r+='X'
		elif c[i]=='c':
			r+='W'
		elif c[i]=='b':
			r+='V'
		elif c[i]=='a':
			r+='U'
		else:
			r+=c[i]
		i+=1
	if len(r)==1:
		r='0'+r
	elif len(r)<1:
		r='00'+r
	print r
	ti+=1