t[];main(s){for(;gets(&s);t[6]+=48,puts(t+6))strptime(&s,"%Y%m%d",t);}