inp = input() moji = '' for i in inp: j = i.upper() if j == i: moji += i.lower() else: moji += j print(moji)