S = input() a = '' for v in S: if upper.v() == v: a += lower.v() else: a += upper.v() print(a)