word = eval(input())

print((word.swapcase()))



inp = eval(input())

print((inp.swapcase()))



word = eval(input())
print((word.swapcase()))

inp = eval(input())
print((inp.swapcase()))

-word = eval(input()) -print((word.swapcase())) +inp = eval(input()) +print((inp.swapcase()))