modify-the-string

You have been given a String S consisting of uppercase and lowercase English alphabets. You need to change the case of each alphabet in this String. That is, all the uppercase letters should be converted to lowercase and all the lowercase letters should be converted to uppercase. You need to then print the resultant String to output.

Input Format
The first and only line of input contains the String S  

Output Format
Print the resultant String on a single line.   

Constraints
 1 ≤ |S| ≤ 100   where |S|  denotes the length of string S.  

SAMPLE INPUT
abcdE

SAMPLE OUTPUT
ABCDe

Source: hackerearth | Difficulty: EASY


Solutions:
S = input()
if len(S) in range(2, 101):
	new_list = []
	for el in S:
		if el.islower():
			new_list.append(el.upper())
		else:
			new_list.append(el.lower())
	
	print(''.join(new_list))
else:
	string = input()
	


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
string  = input()
string = string.swapcase()
print(string)


st = input()
new_st=str()
for x in st:
	if x.isupper():
		new_st+=x.lower()
	else:
		new_st+=x.upper()
print(new_st)



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


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
input_str = input('')
output_str = ""
for char in input_str:
	if char.islower():
		output_str = output_str + char.upper()
	else:
		output_str = output_str + char.lower()
	
print(output_str)


import fileinput

'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
to_return = ""

for s in fileinput.input():
	for i in list(s):
		if(i.istitle()):
			to_return = to_return + i.lower()
		else:
			to_return = to_return + i.upper()
		
	print(to_return)


S = input()
if len(S) in range(2, 101):
	new_list = []
	for el in S:
		if el.islower():
			new_list.append(el.upper())
		else:
			new_list.append(el.lower())
	
	print(''.join(new_list))
else:
	string = input()
	


import sys

for char in input():
	if char.islower():
		sys.stdout.write(char.upper())
	else:
		sys.stdout.write(char.lower())


import sys
inp=input()
for char in inp:
	if char.islower():
		sys.stdout.write(char.upper())
	else:
		sys.stdout.write(char.lower())


y = input()
print(y.swapcase())


h=input(" ")
print(h.swapcase())


ram=input()
print(ram.swapcase())


string = input()
result = ''

for i in range(0, len(string)):
	if string[i].islower():
	   	result += string[i].upper()
		
		
	else:
	   	result += string[i].lower()
print(result)	   	


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


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
print("".join(c.upper() if c.islower() else c.lower() for c in input("")))


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
print("".join(c.upper() if c.islower() else c.lower() for c in input("")))


y = input()
print(y.swapcase())


a=input()
res=[]
for i in a:
	if ord(i)>=65 and ord(i)<=90:
		res.append(chr(ord(i)+32))
	else:
		res.append(chr(ord(i)-32))
print("".join(res))


s=input("")
l=[]
k=[]
a=""
for i in s:
	l.append(i)
for j in l:
	if ord(j)>90:
		m=ord(j)-32
	else:
		m=ord(j)+32
	n=chr(m)
	k.append(n)
for b in k:
	a=a+b
print(a)


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
name = input()
reverse = ""
for s in name:
	if s.islower():
		reverse += s.upper()
	else:
		reverse += s.lower()
		
print(reverse)


S = input()
i = int()
NS = str()
for i in range(0,len(S)):
	NS = S.swapcase()

print(NS)


b=input()
print(b.swapcase())