r=raw_input while 1:print r().upper()+'\n'+r().lower()