minke さんの 48B を縮められず
s=raw_input();print''.join(map(min,s,s.title()))
title() 使えないなんて。
'LL Golf'.title() => 'Ll Golf'