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.



Sample input:
fAIR, LATER, OCCASIONALLY CLOUDY.


Sample output:
Fair, later, occasionally cloudy.

Submission status: Accepted

Solution code:
a=raw_input().split(',')
b=[]
c=[]
for i in range(len(a)):
    for j in range(len(a[i])):
        if a[i][j].isalpha():
            if a[i][j].islower():
                b.append(a[i][j].upper())
            else:
                b.append(a[i][j].lower())
        else:
            b.append(a[i][j])
    c.append(''.join(b))
    b=[]
print(','.join(c))

Submission status: Accepted

Solution code:
# coding: utf-8

print("".join(i.upper() if i.islower() else i.lower() for i in input()))

Submission status: Accepted

Solution code:
def transform(c):
    if type(c) is str:
        if c.isupper():
            return c.lower()
        else:
            return c.upper()
    else:
        return c
    
print("".join(map(lambda c: transform(c), input())))

Submission status: Accepted

Solution code:
c_dif = ord('A')-ord('a')
s = input()
for c in s:
    if ord('a')<= ord(c) and ord(c) <= ord('z'): 
        print(chr(ord(c)+c_dif) ,end='')
    elif ord('A')<= ord(c) and ord(c) <= ord('Z'): 
        print(chr(ord(c)-c_dif) ,end='')
    else:
        print(c, end='')
print()

Submission status: Accepted

Solution code:
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(''.join(s))

Submission status: Accepted

Solution code:
#coding:utf-8

s=input()
ans = ""
for x in s:
	if x.isupper():
		ans+=x.lower()
	else:
		ans+=x.upper()

print(ans)

Submission status: Accepted

Solution code:
S = raw_input()
T = ""
for x in S:
    if x.islower():
        T += x.upper()
    elif x.isupper():
        T += x.lower()
    else:
        T += x
print T

Submission status: Accepted

Solution code:
import string

s = input()

print(s.translate(str.maketrans(string.ascii_uppercase+string.ascii_lowercase, string.ascii_lowercase+string.ascii_uppercase)))

Submission status: Accepted

Solution code:
import string

s = input()

print(s.translate(str.maketrans(string.ascii_uppercase + string.ascii_lowercase,
                                string.ascii_lowercase + string.ascii_uppercase)))

Submission status: Accepted

Solution code:
import string

print(input().translate(str.maketrans(
    string.ascii_uppercase + string.ascii_lowercase,
    string.ascii_lowercase + string.ascii_uppercase)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
ITP-1_8-A
 ??§????????¨?°????????????\?????????
????????????????????????????°?????????¨??§???????????\????????????????????°????????????????????????????????????
???Input
????????????1???????????????????????????
???Output
????????????????????????????°?????????¨??§???????????\????????????????????????????????????????????????
??¢????????????????????\???????????????????????????????????????????????????
'''
# inputData
inputData = input()

for i in range(len(inputData)):
    if "a"<=inputData[i]<="z":
        # ??§????????????
        print(inputData[i].upper(),end='')
    elif "A"<=inputData[i]<="Z":
        # ?°?????????????
        print(inputData[i].lower(),end='')
    else:
        # ??¢????????????????????\?????????????????????
        print(inputData[i],end='')

# ????????????
print('')

Submission status: Accepted

Solution code:
words = input()
_words = ""
for case in words:
  if case != case.upper():
    case = case.upper()
  elif case != case.lower():
    case = case.lower()
  _words += case
print (_words)

Submission status: Accepted

Solution code:
data = input()
print(data.swapcase())

Submission status: Accepted

Solution code:
import sys

#fin = open("test.txt", "r")
fin = sys.stdin

str = fin.readline()

print(str.swapcase(), end="")

Submission status: Accepted

Solution code:
#!usr/bin/env python3


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

print(S.swapcase())

Submission status: Accepted

Solution code:
S = raw_input()
O = ''
for s in S:
    if s.isupper():
        O += s.lower()
    elif s.islower():
        O += s.upper()
    else:
        O += s
print O

Submission status: Accepted

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

Submission status: Accepted

Solution code:
in_str = input().rstrip()
print(in_str.swapcase())

Submission status: Accepted

Solution code:
line = input()
result = line.swapcase()
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sample = input()
res =[]

for s in sample:
    if s.lower() == s:
        res.append(s.upper())
    elif s.upper() == s:
        res.append(s.lower())

print("".join(res))

Submission status: Accepted

Solution code:
str1 = input()
print(str1.swapcase())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
stt = ""
line = input()
for i in range(len(line)):
    if re.compile("[A-Z]").search(line[i]):
        stt += line[i].lower()
    elif re.compile("[a-z]").search(line[i]):
        stt += line[i].upper()
    else:
        stt += line[i]
print(stt)

Submission status: Accepted

Solution code:
s = list(raw_input())
for i in range(len(s)):
	if s[i].islower():
		s[i]=s[i].upper()
	else:
		s[i]=s[i].lower()	
print ''.join(s)

Submission status: Accepted

Solution code:
strings=input()

for i in strings:
    if "a" <= i <= "z":
        print(i.upper(), end="")
    elif "A" <= i <= "Z":
        print(i.lower(), end="")
    else:
        print(i, end="")
print("")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os


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

Submission status: Accepted

Solution code:
string = input()
for n in range(len(string)):
    if string[n] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
        print(string[n].lower(), end="")
    elif string[n] in "abcdefghijkelmnopqrstuvwxyz":
        print(string[n].upper(), end="")
    else:
        print(string[n], end="")
print()

Submission status: Accepted

Solution code:
string = input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
 
def func():
    try:
        line=input().rstrip()
    except EOFError:
        return 0
    except:
        return inputError()

    print(line.swapcase())
        
def inputError():
    print("input Error")
    return -1
 
func()

Submission status: Accepted

Solution code:
text = input()
newText = ""

for x in text:
    if x.isupper():
        newText = newText + x.lower()
    elif x.islower():
        newText = newText + x.upper()
    else:
        newText = newText + x
    
print(newText)

Submission status: Accepted

Solution code:
str = raw_input()
li = []

for c in list(str):
    if c.isupper():
        li.append(c.lower())
    elif c.islower():
        li.append(c.upper())
    else:
        li.append(c)
print ''.join(li)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*
str = input()
for i in range(len(str)):
    if "a" <= str[i] <= "z":
        print(str[i].upper(), end='')
    else:
        print(str[i].lower(), end='')
print()

Submission status: Accepted

Solution code:
def convert(s):
    o = ord(s)
    if o >= 65 and o <= 90:
        return s.lower()
    elif o >= 97 and o <= 122:
        return s.upper()
    return s


def main():
    strings = input()
    answer = ""
    for s in strings:
        s = s
        answer += convert(s)
    print(answer)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
line = input()

for ch in line:
    n = ord(ch)

    if   ord('a') <= n <= ord('z'):
        n -= 32
    elif ord('A') <= n <= ord('Z'):
        n += 32

    print(chr(n), end='')

print()

Submission status: Accepted

Solution code:
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("")

Submission status: Accepted

Solution code:
s = input()
for c in s:
    if (c.islower()):
        print(c.upper(), end='')
    else:
        print(c.lower(), end='')
print()

Submission status: Accepted

Solution code:
S = input()
for i in S:
    print(i.swapcase(), end='')
print()

Submission status: Accepted

Solution code:
#coding:utf-8

moji = list(input().rstrip())
moji2 =[]
for i in moji:
    if i.isalpha() == False:
        moji2.append(i)

    elif i.islower() == True:
        moji2.append(i.upper())
    else:
        moji2.append(i.lower())

print("".join(moji2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
u = s.upper()
l = s.lower()
a = []
for i in range(len(s)):
    if s[i] == u[i]:
        a.append(l[i])
    else:
        a.append(u[i])
print("".join(a))

Submission status: Accepted

Solution code:
line = raw_input()
output = ""
for i in line:
    if i.isupper():
        output += i.lower()
    elif i.islower():
        output += i.upper()
    else:
        output += i
print output

Submission status: Accepted

Solution code:
S = input()
for s in S:
    print(s.swapcase(), end = "")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def swap(c):
    if c.isupper():
        return c.lower()
    else:
        return c.upper()

print(''.join(map(swap, input())))

Submission status: Accepted

Solution code:
x=[(i) for i in input().split()]
for i in range(len(x)-1):
    print(x[i].swapcase(),"",end="")
print(x[len(x)-1].swapcase())

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
??§???????°?????????????
"""
tra = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
trb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
inp = input().strip()
print(inp.translate(str.maketrans(tra,trb)))

Submission status: Accepted

Solution code:
from string import ascii_lowercase as LOW
from string import ascii_uppercase as UP

a = {l:u for l,u in zip(list(LOW),list(UP))}
b = {u:l for u,l in zip(list(UP),list(LOW))}
a.update(b)

data = input()
data = [a[s] if s in a else s for s in data]
data = ''.join(data)
print(data)

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
t = input()
print (str.swapcase(t))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string = input()
out_string = []
for i in range(len(string)):
    if string[i].isupper():
        out_string.append(string[i].lower())
    else:
        out_string.append(string[i].upper())

print("".join(out_string))

Submission status: Accepted

Solution code:
x=input()
ret = ''
for a in x:
    if a.islower() : a = a.upper()
    elif a.isupper(): a = a.lower()
    ret += a
print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print ''.join(map(check, map(str, raw_input())))
# use it 'swapcase' then it's easily

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_8_A: Toggling Cases
#
import sys, math, os

# read input:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
letters=input()
print(letters.swapcase())

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
def main():
    S = list(input())
    
    Uc = [chr(i) for i in range(65, 65 + 26)] #upper case
    Lc = [chr(i) for i in range(97, 97 + 26)] #lower case
    
    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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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('')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
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:])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# Belongs to : midandfeed aka asilentvoice
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)

Submission status: Accepted

Solution code:
# -*-coding:utf-8

def main():

    inputStr = input()

    print(inputStr.swapcase())

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
def main():
    S = input()
    # my swapcase
    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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = raw_input()

print(S.swapcase())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8
i = raw_input()
print i.swapcase()

Submission status: Accepted

Solution code:


s = input()

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

Submission status: Accepted

Solution code:
# coding: UTF-8
moji = str(raw_input())
print moji.swapcase()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

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='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()

print(i.swapcase())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# por que 50 por que por que
# por que 50 por que por que
# por que 50 por que por que
# por que 50 por que por que

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#coding: utf-8

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("")

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline()

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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='')

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
line = input()

print(line.swapcase())

Submission status: Accepted

Solution code:
#! python3
# toggling_cases.py

x = input()

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

print(rst)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
lin=str(input())
print(lin.swapcase())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

print()

Submission status: Accepted

Solution code:
# AOJ ITP1_8_A

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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
# Toggling Cases

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
x = input()

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    input_word = input()
    print(input_word.swapcase())

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

print z

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line =input()

print(line.swapcase())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=str(input())

print(str.swapcase(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

print(s.swapcase())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


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

Submission status: Accepted

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

Submission status: Accepted

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