i=5 while~0:_=raw_input();c='okiram'[i];print _.replace(c,c.upper());i-=c in _