#!/usr/bin/python3
date = input("Enter the date (dd/mm/yy): ")
dd,mm,yy = date.split('/')
dd = int(dd)
mm = int(mm)
yy = int(yy)
if (mm==1 or mm==3 or mm==5 or mm==7 or mm==8 or mm==10 or mm==12):
	max1 = 31
elif (mm==4or mm==6 or mm==9 or mm==11):
	max1 = 30
elif (yy%4==0 and yy%100!=0 or yy%400==0):
	max1 = 29
else:
	max1 = 28
if (mm<1 or mm>12):
	print("Date is invalid")
elif (dd<1 or dd>max1):
	print("Date is invalid")
elif(dd == max1 and mm!=12):
	dd = 1
	mm += 1 
	print("The next date is :{}/{}/{}".format(dd,mm,yy)) 
elif(dd == max1 and mm ==12):
	dd = 1
	mm = 1
	yy += 1
	print("The next date is :{}/{}/{}".format(dd,mm,yy)) 
else :
	dd += 1
	print("The next date is :{}/{}/{}".format(dd,mm,yy)) 
