Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第三次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 123ms
Memory: 21444kB
Author: 18367003035
In contest: 1087

n,y,r=map(int,raw_input().strip().split())
month=[31,28,31,30,31,30,31,31,30,31,30,31]

def runnian(a):
	if a%4==0 and a%100 != 0 or a%400 ==0:
		return 1
	else:
		return 0

if runnian(n)==1:
	month[1]=29
if r<month[y-1]:
	r=r+1
else:
	if y<12:
		y=y+1
		r=1
	else:
		n=n+1
		y=1
		r=1
print n,y,r