S = input() passfornow = '' for L in S: if L.islower(): passfornow += L.upper() else: passfornow += L.lower() print(passfornow)