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):
i = map(str, raw_input())

def check(x):
    if x.islower():
        return x.upper()
    else:
        return x.lower()

ret = []
for x in i:
    ret += [check(x)]

print ''.join(ret)

Solution (Python):
i = map(str, raw_input())

def check(x):
    if x.islower():
        return x.upper()
    return x.lower()

print ''.join(map(check, i))

Solution (Python):
def check(x):
    if x.islower():
        return x.upper()
    return x.lower()

print ''.join(map(check, map(str, raw_input())))

Solution (Python):
def check(x):
    if x.islower():
        return x.upper()
    return x.lower()

print ''.join(map(check, map(str, raw_input())))

Solution (Python):
def check(x):
    if x.islower():
        return x.upper()
    return x.lower()

print ''.join(map(check, map(str, raw_input())))

Solution (Python):


import sys, math, os


PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


out = ""
for char in input().strip():
    o = ord(char)
    if 65 <= o <= 90:
        out += chr(o + 32)
    elif 97 <= o <= 122:
        out += chr(o - 32)
    else:
        out += char
print(out)

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

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
I = input()

for i in range(len(I)):
    if 'a' <= I[i] <= 'z':
        print(I[i].upper(), end = '')
        continue
    if 'A' <= I[i] <= 'Z':
        print(I[i].lower(), end = '')
        continue
    print(I[i], end = '')
print()

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

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

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

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

Solution (Python):
letters=input()
print(letters.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):


string = raw_input()
new_string = ""
for s in string:
    if s.islower():
        new_string += s.upper()
    elif s.isupper():
        new_string += s.lower()
    else:
        new_string += s
print new_string

Solution (Python):
l = [c.lower() if c.isupper() else c.upper() for c in list(input())]
print(''.join(l))

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

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

Solution (Python):
old_char = raw_input()
new_char = ""
for i in old_char:
	if i.islower():
		new_char += i.upper()
	elif i.isupper():
		new_char += i.lower()
	else:
		new_char += i
print new_char

Solution (Python):
def main():
    S = list(input())
    
    Uc = [chr(i) for i in range(65, 65 + 26)] 
    Lc = [chr(i) for i in range(97, 97 + 26)] 
    
    for x in range(len(S)):
        if S[x] in Uc:
            S[x] = Lc[Uc.index(S[x])]
        elif S[x] in Lc:
            S[x] = Uc[Lc.index(S[x])]
        else:
            pass

    for x in range(len(S)):
        if x != len(S) - 1:
            print(S[x], end = "")
        else:
            print(S[x])


if __name__ == "__main__":
    main()

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

Solution (Python):
import re

def transletter(matchobj):
    letter = matchobj.group(0)
    if letter.islower(): return letter.upper()
    else: return letter.lower()
    
def main():

    text = input()
    print(re.sub(r'[a-zA-Z]', transletter, text))
    
main()

Solution (Python):
line = input()

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

Solution (Python):

"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_A&lang=jp

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    s = input().strip()
    toggled = s.swapcase()
    print(toggled)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
s = input()
m = {}
for k in 'abcdefghijklmnopqrstuvwxyz':
    upper = k.upper()
    m[k] = upper
    m[upper] = k
    
r = ''
for t in s:
    if t in m:
        r += m[t]
    else:
        r += t
        
print(r)

Solution (Python):

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

Solution (Python):


def main():

    inputStr = input()

    print(inputStr.swapcase())

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
my_str = input()

for i in range(len(my_str)):
    if "a" <= my_str[i] <= "z":
        sys.stdout.write(my_str[i].upper())
    elif "A" <= my_str[i] <= "Z":
        sys.stdout.write(my_str[i].lower())
    else:
        sys.stdout.write(my_str[i])
sys.stdout.write("\n")

Solution (Python):
def main():
    S = input()
    
    for s in S:
        o = ord(s)
        if 97 <= o < 97 + 26:
            o -= 32
        elif 65 <= o < 65 + 26:
            o += 32

        print(chr(o), end="")
    print("")

if __name__ == "__main__":
    main()

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

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

Solution (Python):
s=input();u=s.upper();l=s.lower()
print(''.join([(u[i],l[i])[s[i]==u[i]]for i in range(len(s))]))

Solution (Python):
s=input();u=s.upper();l=s.lower()
print(''.join([(u[i],l[i])[s[i]==u[i]]for i in range(len(s))]))

Solution (Python):
s = input()
t = list(s)
for i in range(len(t)):
    if t[i].islower() == True:
        t[i] = t[i].upper()
    elif t[i].isupper() == True:
        t[i] = t[i].lower()
print("".join(t))

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

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

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

Solution (Python):
S = raw_input()

print(S.swapcase())

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

Solution (Python):

print(input().swapcase())

Solution (Python):
print(input().translate(str.maketrans('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')))

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

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

Solution (Python):

i = raw_input()
print i.swapcase()

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

Solution (Python):


s = input()

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

Solution (Python):

moji = str(raw_input())
print moji.swapcase()

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

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

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

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

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

Solution (Python):
import sys

s = sys.stdin.readline().rstrip('\r\n')
ss = ''

for ii in range(len(s)):
  if 'a' <= s[ii] <= 'z':
    ss += s[ii].upper()
  elif 'A' <= s[ii] <= 'Z':
    ss += s[ii].lower()
  else:
    ss += s[ii]

print(ss)

Solution (Python):
def check(x):
    if x.islower():
        return x.upper()
    return x.lower()

print ''.join(map(check, map(str, raw_input())))

Solution (Python):



import sys

s = sys.stdin.readline()
for c in s:
    if c.islower():
        print(c.upper(), end='')
    elif c.isupper():
        print(c.lower(), end='')
    else:
        print(c, end='')

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

Solution (Python):
i = input()

print(i.swapcase())

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

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

Solution (Python):





s = raw_input()
print(s.swapcase())

Solution (Python):
def toggle(s):
    """Return a copy of the string with uppercase characters
    converted to lowercase and vice versa.

    >>> toggle("fAIR, LATER, OCCASIONALLY CLOUDY.")
    'Fair, later, occasionally cloudy.'
    """
    return s.swapcase()


def run():
    print(toggle(input()))


run()

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

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

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

Solution (Python):
s = input()
small = 'abcdefghijklmnopqrstuvwxyz'
large = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in s:
    q = 0
    while q < 26:
        if i == small[q]:
            ans += large[q]
            break
        elif i == large[q]:
            ans += small[q]
            break
        q += 1
    if q == 26:
        ans += i
print(ans)

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

Solution (Python):


s = input()
for i in range(len(s)):
    if ord(s[i]) >= ord('a') and ord(s[i]) <= ord('z'):
        print(chr(ord(s[i])-32), end='')
    elif ord(s[i]) >= ord('A') and ord(s[i]) <= ord('Z'):
        print(chr(ord(s[i])+32), end='')
    else:
        print(s[i], end='')
print("")

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

Solution (Python):
import sys

s = sys.stdin.readline()

print(s.swapcase(),end='')

Solution (Python):
x = input()

y = ""
for i in range(0,len(x)):
    if x[i] >= 'a' and x[i] <= 'z':
        y += x[i].upper()
    else:
        y += x[i].lower()
print(y)

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

Solution (Python):
def backoutput(y):
    if y.isupper():
        return y.lower()
    elif y.islower():
        return y.upper()
    else:
        return y

first_input = list(map(backoutput, input()))
print(*first_input, sep='')

Solution (Python):
char = list(input())
for i in range(len(char)):
    if char[i].islower():
        char[i] = char[i].upper()
    elif char[i].isupper():
        char[i] = char[i].lower()
print(''.join(char))

Solution (Python):

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

Solution (Python):


char = input()
print(char.swapcase())

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

Solution (Python):
str = list(input())
for i in range(len(str)):
    if str[i].islower():
        str[i] = str[i].upper()
    elif str[i].isupper():
        str[i] = str[i].lower()
for i in range(len(str)):
    print(str[i], end = '')
print()

Solution (Python):
line = input()

print(line.swapcase())

Solution (Python):



x = input()

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

print(rst)

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):
lin=str(input())
print(lin.swapcase())

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

Solution (Python):
s=list(input())
ans=""
for i in s:
    ans+=i.swapcase()
print(ans)

Solution (Python):
print raw_input().strip('\n').swapcase()

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

Solution (Python):
s = input()
ss = ''

for i in s:
    if i.islower():
        l = i.upper()
    elif i.isupper():
        l =i.lower()
    else: l = i
    ss += l
print(ss)

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

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

Solution (Python):
S = input()
for c in S:
    print(c.swapcase(), end='')

print()

Solution (Python):


def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    string = input()
    answer = ""
    for i in range(len(string)):
        if 65 <= ord(string[i]) <= 90: answer += chr(ord(string[i]) + 32)
        elif 97 <= ord(string[i]) <= 122: answer += chr(ord(string[i]) - 32)
        else: answer += string[i]
    print(answer)

if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys

message = str(input())

for c in message:
	order = ord(c)
	if order >= 65 and order <= 90:
		sys.stdout.write(chr(order + 32))
	elif order >= 97 and order <= 122:
		sys.stdout.write(chr(order - 32))
	else:
		sys.stdout.write(c)
print()

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

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

Solution (Python):


input_line = input()
print(input_line.swapcase())

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

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

Solution (Python):
i = str(input())
w =''
for let in i:
    if(let == let.upper()):
        w = w + let.lower()
    elif(let == let.lower()):
        w = w + let.upper()
    else:
        w = w + let
print(w)

Solution (Python):
x = input()

if len(x) < 1200:
  x = x.swapcase()
  print(x)

Solution (Python):
if __name__ == "__main__":
    input_word = input()
    print(input_word.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):
n = input()
print(n.swapcase())

Solution (Python):
c=list(input())
for i in c:
    print(i.swapcase(),end="")
print()

Solution (Python):
print("".join([x.upper() if x.islower() else x.lower() for x in raw_input()]))

Solution (Python):
import sys

for line in sys.stdin:
    print line.strip('\n').swapcase()

Solution (Python):
print raw_input().strip('\n').swapcase()

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

Solution (Python):
t=list(str(raw_input()))
o=""
for i in range(len(t)):
        if t[i].isupper():
                t[i]=t[i].lower()
        elif t[i].islower():
                t[i]=t[i].upper()
for i in range(len(t)):
        o+=t[i]
print o

Solution (Python):
from __future__ import division, print_function
from sys import stdin
print(stdin.readline().swapcase(), end='')

Solution (Python):
n = list(raw_input())

for i in xrange(len(n)):
    if n[i].isupper(): n[i]=n[i].lower()
    elif n[i].islower(): n[i]=n[i].upper()
print ''.join(n)

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

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

Solution (Python):
line = raw_input()
line2 = ''
for s in line:
    if s == '\n':
        break
    elif s.islower():
        line2 += s.upper()
    elif s.isupper():
        line2 += s.lower()
    else:
        line2 += s
print line2

Solution (Python):
z = ""
for x in raw_input():
    if x.islower():
        z += x.upper()
    else:
        z += x.lower()

print z

Solution (Python):
text = raw_input()
ans = ""
for s in text:
	if s.isalpha(): 
		ans += s.upper() if s.islower() else s.lower()
	else:
		ans += s
print ans

Solution (Python):
print(''.join(c.upper() if c.islower() else c.lower() if c.isupper() else c for c in input()))

Solution (Python):
line =input()

print(line.swapcase())

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

Solution (Python):
txt=input()
a=[]
i=0
while(i<len(txt)):
    if txt[i].isupper():
        a.append(txt[i].lower())
        i+=1
    elif txt[i].islower():
        a.append(txt[i].upper())
        i+=1
    else:
        a.append(txt[i])
        i+=1
for j in range(0,len(a),1):
    if j==len(a)-1:
        print(a[j])
    else:    
        print(a[j],end="")

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

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

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

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

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

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

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

for i in range(len(a)):
    if a[i].isupper():
        b+=a[i].lower()
    elif a[i].islower:
        b+=a[i].upper()
        
print(b)

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

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

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

print(str.swapcase(n))

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

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s = list(input())
for i in range(len(s)):
  if s[i].islower():
    s[i] = s[i].upper()
  else:
    s[i] = s[i].lower()
print(*s,sep='')

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

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

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

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

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

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

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

print(s.swapcase())

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

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

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

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

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

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

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

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

Solution (Python):
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


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

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

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

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

Solution (Python):




def main():
    S = input()
    print(S.swapcase())


if __name__ == '__main__':
    main()

Solution (Python):
print(input().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):
input_str = input()

for i in input_str:
    if i.islower():
        print(i.upper(), end='')
    else:
        print(i.lower(), end='')
print()

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

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

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

Solution (Python):
import re

strings = input()


def swapletter(match):
    word = match.group()
    return word.swapcase()


data = re.sub(r"\w+", swapletter, strings)
print(data)

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

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

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

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

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

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

ans = []
for c in s:
    if c.islower():
        ans.append(c.upper())
    elif c.isupper():
        ans.append(c.lower())
    else:
        ans.append(c)

print("".join(ans))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
sent = input()

s = sent.swapcase()
print(s)

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

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

Solution (Python):



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):





line = 'fAIR, LATER, OCCASIONALLY CLOUDY.'
line = input()
output = ''
for i in range(len(line)):
    if line[i].isupper():
        output += line[i].lower()
    elif line[i].islower():
        output += line[i].upper()
    else:
        output += line[i]
print(output)

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

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

Solution (Python):
string = list(map(str, input()))
ans =[]
for char in string:
    if char.islower():
        ans.append(char.upper())
    elif char.isupper():
        ans.append(char.lower())
    else:
        ans.append(char)
    print(ans[-1], end="")
print()

Solution (Python):
n=input()
m=''

for i in range(len(n)):
    a=str(n[i])
    if(n[i].islower()):
        a=n[i].upper()
    elif(n[i].isupper()):
        a=n[i].lower()
    m+=a
print(m)

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

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

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

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

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

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

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

Solution (Python):
S = list(open(0).read())
ss = []
for s in S:
    if 'a' <= s <= 'z':
        ss.append(s.upper())
    elif 'A' <= s <= 'Z':
        ss.append(s.lower())
    else:
        ss.append(s)
print("".join(ss), end="")

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

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

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

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

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

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

Solution (Python):
buf = input()
buf_len = len(buf)

str_array = []
for i in range(buf_len):
    str_array.append(buf[i])

for i in range(buf_len):
    if str_array[i].isupper():
        str_array[i] = str_array[i].lower()
    else:
        str_array[i] = str_array[i].upper()

for i in range(buf_len):
    print("%s" % str_array[i], end="")

print()

Solution (Python):
str_list = list(input().split(","))
new_list=[]
for i in range(len(str_list)):
    f=[]
    for j in str_list[i]:
        if j.islower()==True:
            f.append(j.upper())
        elif j.isupper()==True:
            f.append(j.lower())
        else:
            f.append(j)
    new_list.append("".join(f))
for i in range(len(new_list)):
    if i==len(new_list)-1:
        print("{}".format(new_list[i]))
    else:
        print("{},".format(new_list[i]),end="")

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

Solution (Python):
test_string = input()

words = test_string.split(", ")
cases_switched_strings = []

for word in words:
    cases_switched_strings.append(word.swapcase())

output = ", ".join(cases_switched_strings)

print(output)

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

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

Solution (Python):
def resolve():
    s = input()

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


resolve()

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

Solution (Python):
s = input()
print(f'{s.swapcase()}')

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

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

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

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

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

Solution (Python):
s = str(input())
t = ''
for c in s:
    if 65 <= ord(c) and ord(c) <= 90:
        t += c.lower()
    elif 97 <= ord(c) and ord(c) <= 122:
        t += c.upper()
    else:
        t += c
print(t)

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

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

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):
text = input()
print(text.swapcase())

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

Solution (Python):

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

Solution (Python):


def main():
    string = input()
    answer=""
    for s in string:
        if s.islower()==True:
            answer+=s.upper()
        elif s.isupper():
            answer+=s.lower()
        else:
            answer+=s
    print(answer)

if __name__=="__main__":
    main()

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

Solution (Python):
def is_alphabet(s):
    if (0x41 <= ord(s) and ord(s) <= 0x5A) or (0x61 <= ord(s) and ord(s) <= 0x7A):
        return True
    else:
        return False


def is_upper(s):
    if 0x41 <= ord(s) and ord(s) <= 0x5A:
        return True
    else:
        return False


def is_lower(s):
    if 0x61 <= ord(s) and ord(s) <= 0x7A:
        return True
    else:
        return False


S = input().strip()
ans = ""

for s in S:
    if is_alphabet(s):
        if is_upper(s):
            ans += s.lower()
        else:
            ans += s.upper()
    else:
        ans += s

print(ans)

Solution (Python):
x = input()

str.swapcase(x)

print(str.swapcase(x))

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

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

Solution (Python):

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

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

print(r)

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

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

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

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

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

print(b)

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

Solution (Python):


S = str(input())

swa = S.swapcase()

print(swa)

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

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

Solution (Python):

i = input()

print(i.swapcase())

Solution (Python):
s = input()
print(s.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):
a = input()
print(a.swapcase())

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

Solution (Python):



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

Solution (Python):
strings = input()
result = ''

for i in range(len(strings)):
    if strings[i].isupper():
        result += strings[i].lower()
    elif strings[i].islower():
        result += strings[i].upper()
    else:
        result += strings[i]

print(result)

Solution (Python):
a=input()


print(str.swapcase(a))

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
s = input()
t = ''
for i in s:
    if i in ascii_uppercase:
        t += i.lower()
    elif i in ascii_lowercase:
        t += i.upper()
    else:
        t += i
print(t)

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

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

for c in cs:
  if c.islower():
    print(c.upper(),end="")
  else :
    print(c.lower(),end="")
print()

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

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

Solution (Python):
S = list(input())
for c in S:
    if c.isalpha():
        if c.isupper():
            print(c.lower(), end='')
        else:
            print(c.upper(), end='')
    else:
        print(c, end='')
print()

Solution (Python):
s = input()

print(s.swapcase())

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

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

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

Solution (Python):
s = input()

S = s.swapcase()

print(S)

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

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

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

Solution (Python):
n=input()

print(n.swapcase())

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

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

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

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

Solution (Python):
a = str(input())
for i,b in enumerate(a):
    if b == a[i].upper():
        print(a[i].lower(),end='')
    else:
        print(a[i].upper(),end='')
print()

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

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

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