Problem:
Toggling Cases Write a program which converts uppercase/lowercase letters to lowercase/uppercase for a given string. Input A string is given in a line. Output Print the converted string in a line. Note that you do not need to convert any characters other than alphabetical letters. Constraints  The length of the input string < 1200  Sample Input fAIR, LATER, OCCASIONALLY CLOUDY. Sample Output Fair, later, occasionally cloudy.

Solution (Python):
s = input()
for t in s:
    if t.isupper():
        print(t.lower(),end="")
    else:
        print(t.upper(),end="")
print("")

Solution (Python):
print(input().swapcase())

Solution (Python):
f = lambda c: c.swapcase() if c.isalpha() else c 


print("".join([f(c) for c in input()]))

Solution (Python):
print(input().swapcase())

Solution (Python):
sentence = input()
print(''.join(letter.upper() if letter.islower() else letter.lower() for letter in sentence))

Solution (Python):
a=input()

print(a.swapcase())

Solution (Python):
word = input()
print(word.swapcase())

Solution (Python):
s = input()
lc = s.lower()
uc = s.upper()

ans = ""
for i in range(len(s)):
    if s[i] == lc[i]:
        ans += uc[i]
    else:
        ans += lc[i]
print(ans)

Solution (Python):
s = input()

print(str.swapcase(s))

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
s = input()

o = ""
for w in s:
    if w.isupper():
        o += w.lower()
    elif w.islower():
        o += w.upper()
    else:
        o += w
print(o)

Solution (Python):
N = input()
print(N.swapcase())

Solution (Python):
line = input()
print(line.swapcase())

Solution (Python):
a = str(input())
print(str.swapcase(a))

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
a=str(input())
print(a.swapcase())

Solution (Python):
str1=input()
str2=str1.swapcase()
print(str2)

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):
A=input()
B=str.swapcase(A)
print(B)

Solution (Python):
letter = str(input())
print(letter.swapcase())

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    s = input()
    print(s.swapcase(), end = "")

if __name__ == "__main__":
    main()

Solution (Python):
x = str(input())

print(x.swapcase())

Solution (Python):
def invert_letter(letter):
    inv_letter=""
    for c in letter:
        inv_letter+=c.upper() if c.islower() else c.lower()
    return inv_letter

def run():
    letter_list=list(input().split())
    
    inv_letter_list=[]
    
    for letter in letter_list:
        inv_letter=invert_letter(letter)
        inv_letter_list.append(inv_letter)
        
    
    line_letter=" ".join(inv_letter_list)
    
    print(line_letter)

run()

Solution (Python):
s=input()
res=""
for t in s:
	if t.islower()==True:
		res+=t.upper()
	else:
		res+=t.lower()


print(res)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
s = input()

print(s.swapcase())

Solution (Python):
a=input()
print(a.swapcase())

Solution (Python):
a = str(input())

print(a.swapcase())

Solution (Python):
str = input()
print(str.swapcase())

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):
words=input()
print(str.swapcase(words))

Solution (Python):
a=str(input())
print(a.swapcase())

Solution (Python):
text=str(input())
t=''
for i in text:
    if i.isupper()==True:
        t+=i.lower()
    else:
       t+=i.upper()

print(t)

Solution (Python):
S = input()
ans = ""
for i in range(len(S)):
    if 97<=ord(S[i])<=122:
        ans += chr(65+int(ord(S[i]))-97)
    elif 65<=ord(S[i])<=90:
        ans += chr(97+int(ord(S[i]))-65)
    else:
        ans += S[i]
print(ans)

Solution (Python):
x=input()
y=x.swapcase()
print(y)

Solution (Python):
a=input()
print(a.swapcase())

Solution (Python):
S = input()

ans = ''
for s in S:
    ans += s.upper() if s.islower() else s.lower()
print(ans)

Solution (Python):
s = input()

print(s.swapcase())

Solution (Python):
a = str(input())
print(str.swapcase(a))

Solution (Python):
str=str(input())
print(str.swapcase())

Solution (Python):

import sys
def func2(x):
    if not x.isalpha():
        return x
    else:
        if x.isupper():
            return x.lower()
        else:
            return x.upper()
print("".join(map(lambda x:func2(x),sys.stdin.readline().rstrip())))

Solution (Python):
X = input()

for x in X:
    xx = x.upper()
    if x != xx:
        print(xx,end="")
    else:
        xxx = x.lower()
        if x != xxx:
            print(xxx,end="")
        else:
            print(x,end="")
print("")

Solution (Python):
s = input()


print(s.swapcase())

Solution (Python):
arr = str(input())
print(arr.swapcase())

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):



A = input()

print(A.swapcase())

Solution (Python):
a = str(input())

a = a.swapcase()

print(a)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):



n = input()
print(n.swapcase())

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
n=str(input())

print(n.swapcase())

Solution (Python):


S=input()

print(S.swapcase())

Solution (Python):
str = input()
str = str.swapcase()
print(str)

Solution (Python):
print(input().swapcase())

Solution (Python):
n=input()
print(str.swapcase(n))

Solution (Python):
string = input()
for c in string:
    if 'A' <= c <= 'Z':
        print(c.lower(), end='')
    elif 'a' <= c <= 'z':
        print(c.upper(), end='')
    else:
        print(c, end='')
print()

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):

a=input()
a=str.swapcase(a)
print(a)

Solution (Python):
org = input()
print(org.swapcase())

Solution (Python):
text = input()
print(text.swapcase())

Solution (Python):
def main():
    print(input().swapcase())

    return 0


if __name__ == "__main__":
    main()

Solution (Python):
n =str(input())
print(n.swapcase())

Solution (Python):
a = str(input())
print(a.swapcase())

Solution (Python):

x = str(input())
print(str.swapcase(x))

Solution (Python):
line = input()

for i in line:
    if i.isupper():
        print(i.lower(), end="")
    elif i.islower():
        print(i.upper(), end="")
    else:
        print(i,end="")
print("")

Solution (Python):
x=input()
print(x.swapcase())

Solution (Python):
s=str(input())
print(s.swapcase())

Solution (Python):
s=input()
print(s.swapcase())

Solution (Python):
x = input()
print(x.swapcase())

Solution (Python):
string = list(input())
trans = []

for c in string:
    if c.isupper():
        c = c.lower()
        
    elif c.islower():
        c = c.upper()
    else:
        None
    trans.append(c)

print("".join(trans))

Solution (Python):
n=input()
s=n.swapcase()
print(s)

Solution (Python):
n=input()
m=n.swapcase()
print(m)

Solution (Python):
words=input()
print(str.swapcase(words))

Solution (Python):
s = input()
result = ''
for i, letter in enumerate(s):
    if letter.isupper():
        result += letter.lower()
    else:
        result += letter.upper()
print(result)

Solution (Python):
string = input()
print(string.swapcase())

Solution (Python):
l = list(input())
res = ''
for s in l:
    if s.isupper():
        res += s.lower()
    elif s.islower():
        res += s.upper()
    else:
        res += s
print(res)

Solution (Python):
print(input().swapcase())

Solution (Python):
x=input()
x1=str.swapcase(x)
print(x1)

Solution (Python):
x=input()
print(x.swapcase())

Solution (Python):
S = input()
print(str.swapcase(S))

Solution (Python):
array = list(input())
leng = len(array)
answer = ["" for i in range(leng)]
for i in range(leng):
    if array[i].isupper():
        answer[i] = array[i].lower()
    elif array[i].islower():
        answer[i] = array[i].upper()
    else:
        answer[i] = array[i]
        
print("".join(map(str, answer)))

Solution (Python):
input = input()

for a in input:
    print(a.swapcase(),end='')
print('')

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
k = input()

print(f'{k}'.swapcase())

Solution (Python):
buf=str(input())
print(buf.swapcase())

Solution (Python):
s = ''
for i in input():
    if i.islower() == True:
        s += i.upper()
    elif i.isupper() == True:
        s += i.lower()
    else:
        s += i
print(s)

Solution (Python):
from sys import stdin
sentence = stdin.readline()

for char in sentence:
    if char.isalpha():
        if char.isupper():
            print(char.lower(), end='')
        elif char.islower():
            print(char.upper(), end='')
    else:        
        print(char, end='')

Solution (Python):
print(input().swapcase())

Solution (Python):
string = input()
print(string.swapcase())

Solution (Python):
s = input()
lc = s.lower()
uc = s.upper()

ans = ""
for i in range(len(s)):
    if s[i] == lc[i]:
        ans += uc[i]
    else:
        ans += lc[i]
print(ans)

Solution (Python):
str = input()
for s in str:
	if s.isupper():
		print(s.lower(), end='')
	elif s.islower():
		print(s.upper(), end='')
	else:
		print(s, end='')
print()

Solution (Python):
x = input()
print(x.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
S = input()

Sc = S.swapcase()
print(Sc)

Solution (Python):

text=input()
print(text.swapcase())

Solution (Python):
line = input()
for s in line:
    if s.isupper():
        s = s.lower()
    elif s.islower():
        s = s.upper()
    print(s, end="")
print()

Solution (Python):
string = str(input())
print(string.swapcase())

Solution (Python):
def main():
  s = input()
  print(s.swapcase())

if __name__ == '__main__':
  main()

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
print(str.swapcase(input()))

Solution (Python):
l = input().swapcase()
print(l)

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):
x=input()
print(x.swapcase())

Solution (Python):
s = input().swapcase()

print(s)

Solution (Python):
s= input()

print(s.swapcase())

Solution (Python):
S = input()
swapS = S.swapcase()
print(swapS)

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
letters = str(input())
print(letters.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
string = str(input())
newstring = ""

for i in string:
    if (i.isupper()) == True:
        newstring += (i.lower())
    elif (i.islower()) == True:
        newstring += (i.upper())
    elif (i.isspace()) == True:
        newstring += i
    else:
        newstring += i

print(newstring)

Solution (Python):
strings = input()
print(strings.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
print(str.swapcase(input()))

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
l = input()

print(l.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
n = input()
print(n.swapcase())

Solution (Python):
str = input()
print(str.swapcase())

Solution (Python):
lis=list(input().split())
l=""
for i in range(len(lis)-1):
    for j in lis[i]:
        if j==str.upper(j):
            l+=str.lower(j)
        else:
            l+=str.upper(j)
    print(l,end=" ")
    l=""
for k in lis[-1]:
    if k==str.upper(k):
            l+=str.lower(k)
    else:
        l+=str.upper(k)
print(l)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
strings = input()


upSt = strings.upper()
dwSt = strings.lower()
for i in range(len(strings)):
    if strings[i] == upSt[i]:
        print(dwSt[i],end="")
    else :
        print(upSt[i],end="")
print("")

Solution (Python):
words = input()
print(words.swapcase())

Solution (Python):
str = input()

print(str.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
sentance = input()
print(sentance.swapcase())

Solution (Python):
ls = list(map(str, input().split()))

for i, moji in enumerate(ls):
    for txt in moji:
        if txt.isupper():
            print(txt.lower(),end='')
        else:
            print(txt.upper(),end='')
    if i != len(ls)-1:
        print('' ,end=' ')
    else:
        print()

Solution (Python):
print(input().swapcase())

Solution (Python):

str = input()

print(str.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
s2 = s.swapcase()

print(s2)

Solution (Python):
s=input()
print(s.swapcase())

Solution (Python):
s = str(input())
print(s.swapcase())

Solution (Python):
words = input()
print(words.swapcase())

Solution (Python):
print (input().swapcase())

Solution (Python):
str = input()
print(str.swapcase())

Solution (Python):
S = input()
ans = ""

for s in S:
    if s.islower():
        ans += s.upper()
    elif s.isupper():
        ans += s.lower()

    else:
        ans += s

print(ans)

Solution (Python):
if __name__ == "__main__":
    string = input()

    print(string.swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
str = input()
print(str.swapcase())

Solution (Python):
s = str(input())
t = s.swapcase()
print(t)

Solution (Python):
print (str.swapcase(input()))

Solution (Python):
import string

def toggle_case(c):
    if not c in string.ascii_letters:
        return c
    return string.ascii_letters[(string.ascii_letters.index(c) + 26) % 52]

s = input()
print(''.join(map(toggle_case, s)))

Solution (Python):
S = input()
S = S.swapcase()

print(S)

Solution (Python):
string = input()

string = string.swapcase()

print(string)

Solution (Python):
text = input()
for letter in text:
    if letter.isupper():
        print(letter.lower(), end="")
    elif letter.islower():
        print(letter.upper(), end="")
    else:
        print(letter, end="")
print()

Solution (Python):
A = input()

print(A.swapcase())

Solution (Python):
words=input()
print(str.swapcase(words))

Solution (Python):
for c in input():
    if c.isupper():
        print(c.lower(), end="")
    else:
        print(c.upper(), end="")
print()

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
s = input()

print(s.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
S = input()
tmp=''
for ch in S:
    if ch.islower():
        tmp += ch.upper()
    else:
        tmp += ch.lower()
print(tmp)

Solution (Python):
uw = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lw = "abcdefghijklmnopqrstuvwxyz"

S = list(input())
for i,a in enumerate(S):
    try:
        index = uw.index(a)
        S[i] = lw[index]
    except:
        try:
            index = lw.index(a)
            S[i] = uw[index]
        except:
            continue
print("".join(S))

Solution (Python):
print(input().swapcase())

Solution (Python):
s = str(input())

for i in s:
    if i.isalpha():
        if i.islower():
            print(i.upper(), end="")
        elif i.isupper():
            print(i.lower(), end="")
    else:
        print(i, end="")
print()

Solution (Python):
s = str(input())

print(s.swapcase())

Solution (Python):
str=input()
print(str.swapcase())

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
a = input()
b = a.upper()
c = a.lower()
ans = ''
for i in range(len(a)):
    if a[i] == b[i]:
        ans += c[i]
    else:
        ans += b[i]
print(ans)

Solution (Python):
s = str(input())
print(s.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
lc = s.lower()
uc = s.upper()

ans = ""
for i in range(len(s)):
    if s[i] == lc[i]:
        ans += uc[i]
    else:
        ans += lc[i]
print(ans)

Solution (Python):
l=""
for s in input():
       
    if s.isupper()==True:
        l+=s.lower()
    elif s.islower()==True:
        l+=s.upper()
    else:
        l+=s
print(l)

Solution (Python):
s = input()

print(s.swapcase())

Solution (Python):
str = input()
str = str.swapcase()
print(str)

Solution (Python):
print(input().swapcase())

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)







def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




d = str(input())

d=d.swapcase()

print(d)

Solution (Python):

s = input()
t = ''
for w in s:
    if w.isupper():t+=w.lower()
    elif w.islower():t+=w.upper()
    else :t+=w
print (t)

Solution (Python):
import re
inp=input()
newInp=[]
for ch in inp:


    if re.match(r"[a-z]", ch):
        
        newInp.append(chr(ord(ch)-ord('a')+ord('A')))
    elif re.match(r"[A-Z]", ch):
        
        newInp.append(chr(ord(ch)-ord('A')+ord('a')))
    else:
        newInp.append(ch)

print(''.join(newInp))

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
n=input()
m=''
for i in range(len(n)):
    c=str(n[i])
    if(n[i].islower()):
        c=n[i].upper()
    elif(n[i].isupper()):
        c=n[i].lower()
    m+=c
print(m)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    s = input().strip()

    for c in s:
        if "a" <= c and c <= "z":
            tmp = c.upper()
        elif "A" <= c and c <= "Z":
            tmp = c.lower()
        else:
            tmp = c
        print(tmp, end="")
    print()


if __name__ == "__main__":
    main()

Solution (Python):
str = input()
print(str.swapcase())

Solution (Python):
print(str.swapcase(input()))

Solution (Python):
print(input().swapcase())

Solution (Python):
buf = input()
print(buf.swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
S = input()
S = S.swapcase()
print(S)

Solution (Python):
S = input()
for s in S:
    s = s.upper() if s.lower() == s else s.lower()
    print(s, end='')
print()

Solution (Python):
buf = str(input())
print(buf.swapcase())

Solution (Python):
sentence = input()

print(sentence.swapcase())

Solution (Python):
input_list = list(map(str,input().split(',')))

output_list = list()
for word in input_list:
    word = word.swapcase()
    output_list.append(word)

print(','.join(output_list))

Solution (Python):
sen=input()
sen=sen.swapcase()
print(sen)

Solution (Python):
def ExchangeChar(c): 
  charNum = ord(c)
  if(ord("a") <= charNum and charNum <= ord("z")):
    return chr(charNum - 32) 
  elif(ord("A") <= charNum and charNum <= ord("Z")):
    return chr(charNum + 32)
  else:
    return c

words = list(input())
ans = []
for i in range(len(words)):
  ans.append(ExchangeChar(words[i]))

if(len(ans) == 1):
  print(ans[0])
else:
  for i in range(len(ans)-1):
    print(ans[i],end='')
  print(ans[i+1])

Solution (Python):
s = input()
res = ""

for i in range(len(s)):
    if 65 <= ord(s[i]) and ord(s[i]) <= 90:
        res += chr(ord(s[i]) + 32)
    elif 97 <= ord(s[i]) and ord(s[i]) <= 122:
        res += chr(ord(s[i]) - 32)
    else:
        res += s[i]

print(res)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
str=input()
print(str.swapcase())

Solution (Python):
strSen = input()
listSen = list(strSen)
pattern1 = 'abcdefghijklmnopqrstuvwxyz'
pattern2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(listSen)):
    if listSen[i] in pattern1:
        if i != len(listSen)-1:
            print(listSen[i].upper(), end = "")
        else:
            print(listSen[i].upper())
    elif listSen[i] in pattern2:
        if i != len(listSen)-1:
            print(listSen[i].lower(), end = "")
        else:
            print(listSen[i].lower())
    else:
        if i != len(listSen)-1:
            print(listSen[i], end = "")
        else:
            print(listSen[i])

Solution (Python):
print(str(input()).swapcase())

Solution (Python):
c=list(map(str, input().split()))
r=[]
for i in c:
    r.append(i.swapcase())
print(*r)

Solution (Python):
a = str(input())

a = a.swapcase()

print(a)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
print(str.swapcase(input()))

Solution (Python):
s = input()
ls = s.lower()
us = s.upper()
ans = ""

for i in range(len(s)):
    if s[i] == ls[i]:
        ans += us[i]
    else:
        ans += ls[i]

print(ans)

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()

for i in range(len(s)):
    cut = s[i : i + 1]
    if cut.isalpha() and cut.isupper():
        s = s[:i] + cut.lower() + s[i + 1 :]
    elif cut.isalpha() and cut.islower():
        s = s[:i] + cut.upper() + s[i + 1 :]

print(s)

Solution (Python):
def main(text):
    result = ''
    for t in text:
        if t.isupper():
            result += t.lower()
        elif t.islower():
            result += t.upper()
        else:
            result += t
    return result


if __name__ == "__main__":
    print(main(input()))

Solution (Python):
n = list(input())
for i in range(len(n)):
         tmp = ord(n[i])
         if 65 <= tmp <= 90:
                  n[i] = chr(ord(n[i]) + 32)
         elif 97 <= tmp <= 122:
                  n[i] = chr(ord(n[i]) - 32)
ans = "".join(n)
print(ans)

Solution (Python):
S = list(input())

for i in range(len(S)):
    if S[i].isupper():
        S[i] = S[i].lower()
    else:
        S[i] = S[i].upper()
    
print(''.join(S))

Solution (Python):
s = input()
for i in s:
    if(i.islower()):
        print(i.upper(), end = '')
    elif(i.isupper()):
        print(i.lower(), end = '')
    else:
        print(i, end = '')
print('')

Solution (Python):
t = input()
t = t.swapcase()
print(t)

Solution (Python):
import sys
import itertools
import math



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8').strip()
print(S.swapcase())

Solution (Python):
s = input()
LOWER = "abcdefghijklmnopqrstuvwxyz"
trans = {}
for i in range(len(LOWER)):
    trans[LOWER[i]] = str.upper(LOWER[i])
    trans[str.upper(LOWER[i])] = LOWER[i]
print(s.translate(str.maketrans(trans)))

Solution (Python):
s = input()

ans_s = ''
for c in s:
    if c.isupper():
        ans_s += c.lower()
    elif c.islower():
        ans_s += c.upper()
    else:
        ans_s += c

print(ans_s)

Solution (Python):
s = input()
s = str.swapcase(s)
print(s)

Solution (Python):
s = str(input())
for i in s:
  if i.islower():
    print(i.upper(),end="")
  else:
    print(i.lower(),end="")
print()

Solution (Python):
a = str(input())

print(a.swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input().swapcase()
print(s)

Solution (Python):
print(input().swapcase())

Solution (Python):
s = str(input())
l = len(s)
s = list(s)
for i in range (l):
    if 97 <= ord(s[i]) <= 122:
        s[i] = chr(ord(s[i]) - 32)
    elif 65 <= ord(s[i]) <= 90:
        s[i] = chr(ord(s[i]) + 32)
s = "".join(s)
print(s)

Solution (Python):
s = list(input())

for _s in s:
    print(_s.lower() if _s.isupper() else _s.upper(), end="")
print()

Solution (Python):
sl = list(input())
ans = []
for s in sl:
    if s.isupper() == True:
        ans.append(s.lower())
    elif s.islower() == True:
        ans.append(s.upper())
    else:
        ans.append(s)

print(*ans, sep='')

Solution (Python):
s=input()
print(str.swapcase(s))

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
strs = list(input().split())

rev_strs = [s.swapcase() for s in strs]
print(" ".join(rev_strs))

Solution (Python):
S=input()
for i in range(len(S)):
    if S[i].upper()!=S[i]:
        print(S[i].upper(),end="")
    elif S[i].lower()!=S[i]:
        print(S[i].lower(),end="")
    else:
        print(S[i],end="")
print("")

Solution (Python):
s = input()

new_s = ""

for i in range(len(s)):
    char = s[i : i + 1]
    if char.islower():
        new_s += char.upper()
    elif char.isupper():
        new_s += char.lower()
    else:
        new_s += char

print(new_s)

Solution (Python):
moji = input()

print(moji.swapcase())

Solution (Python):
S = list(input())
for i in range(len(S)):
    if 65 <= ord(S[i]) < 65+26:
        S[i] = S[i].lower()
    elif 97 <= ord(S[i]) < 97+26:
        S[i] = S[i].upper()
print(''.join(S))

Solution (Python):
n=input()
m=''
for i in range(len(n)):
    c=str(n[i])
    if(n[i].islower()):
        c=n[i].upper()
    elif(n[i].isupper()):
        c=n[i].lower()
    m+=c
print(m)

Solution (Python):
print(input().swapcase())

Solution (Python):
str=input()
print(str.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
str_x = input()
print(str_x.swapcase())

Solution (Python):
s = input()
ans = ""
for i in range(len(s)):
    if s[i].isupper():
        ans += s[i].lower()
    else:
        ans += s[i].upper()
print(ans)

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
input_data = str(input())
print(input_data.swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
str=input()
print(str.swapcase())

Solution (Python):
S=input()
print(S.swapcase())

Solution (Python):
string = input()
print(string.swapcase())

Solution (Python):
A = input()
print(A.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
word = str(input())
word = str.swapcase(str(word)) 

print("".join(word))

Solution (Python):
for c in input():
	l = c.lower()
	u = c.upper()
	if c != l:
		print(l, end="")
	elif c!= u:
		print(u, end="")
	else:
		print(c, end="")
print("")

Solution (Python):
print(input().swapcase())

Solution (Python):

inp = input()


result = ""
for i in inp:
    upr = i.upper()
    lwr = i.lower()
    if upr != i:
        result += upr
    else:
        result += lwr
print(result)

Solution (Python):
print(input().swapcase())

Solution (Python):
a = str(input())
print(a.swapcase())

Solution (Python):
x = input()
xResult = ''

for i in range(len(x)):
    xSw = True
    y = x[i:i+1]
    yU = y.upper()
    yL = y.lower()
    
    if y == yU:
        y = yL
    else:
        y = yU

    xResult = xResult + y
    
print(xResult)

Solution (Python):
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


buf = str(input())
print(buf.swapcase())

Solution (Python):
a=raw_input()
print (a.swapcase())

Solution (Python):
import re


def flip_case(char):
    if re.match(r"[a-zA-Z]", char):
        return char.upper() if char.islower() else char.lower()
    else:
        return char


s = input()
ans = []
for c in s:
    ans.append(flip_case(c))
print("".join(ans))

Solution (Python):
def toggling_string(string):

    dummy = string.lower()
    res = list()
    
    for i in range(len(dummy)):
        if dummy[i] == string[i]:
            res.append(dummy[i].upper())
        else:
            res.append(dummy[i].lower())

    print("".join(res))

if __name__ == "__main__":
    
    sentence = input()
    toggling_string(sentence)

Solution (Python):
print(input().swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
print(s.swapcase())

Solution (Python):
l = input()
print(l.swapcase())

Solution (Python):
s=input()
print(s.swapcase())

Solution (Python):
letter = input()
output = ''

for l in letter:
    if l.isupper():
        l = l.lower()
    else:
        l = l.upper()
        
    output += l

print(output)

Solution (Python):
S = input()
r = ""
for s in S:
    if ord("a") <= ord(s) <= ord("z"):
        r += chr(ord(s) - 32)
    elif ord("A") <= ord(s) <= ord("Z"):
        r += chr(ord(s) + 32)
    else:
        r += s
print(r)

Solution (Python):
words = str(input())
print(words.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
given_string = input()

print(given_string.swapcase())

Solution (Python):
a = str(input())
a = a.swapcase()
print(a)

Solution (Python):
print(input().swapcase())

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):
print(input().swapcase())

Solution (Python):
s = input()
  
r = ""
for c in s:
    if c.isupper():
        r += c.lower()
    elif c.islower():
        r += c.upper()
    else:
        r += c

print(r)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    
    s=input()
    ans=""
    for c in s:
        oc=ord(c)
        if c.isupper():
            ans+=c.lower()
        elif c.islower():
            ans+=c.upper()
        else:
            ans+=c
    print(ans)

main()

Solution (Python):
a = input()
print(a.swapcase())

Solution (Python):
s = input()
s = s.swapcase()

print(s)

Solution (Python):
T = input()
print(T.swapcase())

Solution (Python):
S = input()

ans = ''
for s in S:
    ans += s.lower() if s.isupper() else s.upper()

print(ans)

Solution (Python):
s=input()
ans=''
for i in s:
    if i.upper()==i:
        ans+=i.lower()
    else:
        ans+=i.upper()
print(ans)

Solution (Python):
setup=input()
c=""
for i in range(len(setup)):
    tmp_setup=""
    m=str(setup[i])
    tmp_setup=m.upper()
    if  m==tmp_setup:
        tmp_setup=m.lower()
    c=c+tmp_setup
print(c)

Solution (Python):
s = input()
for i in s:
    if i.isupper():
        print(i.lower(), end='')
    else:
        print(i.upper(), end='')
print()

Solution (Python):
S = input()
buf = []
for i in range(len(S)):
    if S[i].islower():
        buf.append(S[i].upper())
    elif S[i].isupper():
        buf.append(S[i].lower())
    else:
        buf.append(S[i])
print("".join(buf))

Solution (Python):
a_str=input()
print(a_str.swapcase())

Solution (Python):
x=input()
ans=''
for i in x:
    if i.isupper():
        ans+=i.lower()
    else:
        ans+=i.upper()
print(ans)

Solution (Python):
s  = input()
r = ''
for i in s:
    if i == i.upper():
        r += i.lower()
    else:
        r += i.upper()

print(r)

Solution (Python):
print(input().swapcase())

Solution (Python):
a = str(input())
print(a.swapcase())

Solution (Python):
s = input()
r = ''
for _ in s:
    if (('A' <= _) and (_ <= 'Z')):
        r += chr(ord(_) + (ord('a') - ord('A')))
    elif ('a' <= _ and _ <= 'z'):
        r += chr(ord(_) - (ord('a') - ord('A')))
    else:
        r += _
print(r)

Solution (Python):
contents=str(input())
print(contents.swapcase())

Solution (Python):
name = str(input())

ans = str.swapcase(name)
print(ans)

Solution (Python):
a = str(input())
print(a.swapcase())

Solution (Python):
a=input()
print(a.swapcase())

Solution (Python):
x = input()
listA=[]
for i in range(len(x)):
    if x[i].islower():
        listA.append(x[i].upper())
    else:
        listA.append(x[i].lower())
        
print("".join(listA))

Solution (Python):
print(input().swapcase())

Solution (Python):
S = input()
print(S.swapcase())

Solution (Python):
string = input()
st = str()
for s in string:
    if s.isalpha():
        if s.islower():
          
            s = s.upper()
        else:
            
            s = s.lower()
    else:pass
 
    st += s

print(st)

Solution (Python):
S = input()
s = ""
for i in range(len(S)):
    if S[i] == S[i].upper():
        s += S[i].lower()
    else:
        s += S[i].upper()
print(s)

Solution (Python):
x = input()
x = x.swapcase()
print(x)

Solution (Python):
n=input()
m=''
for i in range(len(n)):
    c=str(n[i])
    if(n[i].islower()):
        c=n[i].upper()
    elif(n[i].isupper()):
        c=n[i].lower()
    m+=c
print(m)