s = input() t = '' for sx in s: if sx < 'a': t += sx.lower() else: t += sx.upper() print(t)