s = str(input()) afters = "" for i in range(len(s)): if s[i].islower(): afters += s[i].upper() else: afters += s[i].lower() print(afters)