import time import datetime a=list(map(int,input().split())) anyday=datetime.datetime(a[0],a[1],a[2]) nextday=anyday+datetime.timedelta(days=1) b=list(map(int,nextday.strftime('%Y %m %d').split())) for i in b: print(i,end=' ')