These days a lot of new coders are emerging at RJIT. One of the  many programmers in RJIT thought of making a program to find the weekday for any given date. He successfully builds it but there is one problem, his program prints the day of yesterday's date. Now he wonders whether he can find the next date given him the output date.
 

Input

The first line of the input contains an integer T denoting the number of test cases.
Then T lines follow, each containing the present date in following format dd/mm/yyyy.


Output

You need to output a single line for each test case printing the next date in following format dd/mm/yyyy or d/m/yyyy according to the case if it exists or else print "Invalid Date"(without quotes).

 

Constraints

2 ≤ T ≤ 100
1 ≤ dd ≤ 35
1 ≤ mm ≤ 15
1000 ≤ yyyy ≤ 3000

 

Example
Input:
3
16/09/2014
17/09/2014
5/02/2004

Output:
17/9/2014
18/9/2014
6/2/2004
NonLeap_Months=[31,28,31,30,31,30,31,31,30,31,30,31]
Leap_Months=[31,29,31,30,31,30,31,31,30,31,30,31]

def is_leap(year):
	if(year%400==0):
	       return 1
	elif(year%100==0):
	       return 0
	elif(year%4==0):
	       return 1
	else:
	       return 0
T=raw_input().strip('\n')
T=int(T)
for _ in xrange(T):
	Date=raw_input().split('/')
	Year=int(Date[2])
	Month=int(Date[1])
	Day=int(Date[0])
	if(is_leap(Year)==1):
#		print "entered"
		temp=Month-1
		if(Month>=1 and Month<=12 and Day>=1 and Leap_Months[temp]>=Day):
			if(Leap_Months[temp]==Day):
				if(Month==12):
					x=1
					Month=1
					Year+=1
			 		print str(x)+'/'+str(Month)+'/'+str(Year)
				else:
				 	x=1
				 	Month+=1
			 		print str(x)+'/'+str(Month)+'/'+str(Year)

			else:
			 	x=Day+1
			 	print str(x)+'/'+str(Month)+'/'+str(Year)
		else:
		 	print "Invalid Date"
	else:
		temp=Month-1
		if(Month>=1 and Month<=12 and Day>=1 and NonLeap_Months[temp]>=Day):
			if(NonLeap_Months[temp]==Day):
				if(Month==12):
					x=1
					Month=1
					Year+=1
					print str(x)+'/'+str(Month)+'/'+str(Year)
				else:
					x=1
					Month+=1
					print str(x)+'/'+str(Month)+'/'+str(Year)

			else:
				x=Day+1
				print str(x)+'/'+str(Month)+'/'+str(Year)
		else:
			print "Invalid Date"