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: Runtime Error

Solution code:
#include <iostream>
#include <string>
using namespace std;
 
int main() {
  string s;
  getline(cin, s);
  for (int i=0;i<s.size();i++) {
    if (s[i] >= 'a' && s[i] <= 'z')
      s[i] += 'A' - 'a';
    else if (s[i] >= 'A' && s[i] <= 'Z')
      s[i] -= 'A' - 'a';
  }
  cout << s << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = raw_input()

for a in list(str):
    if a.islower():
        print a.upper()
    elif a.isupper():
        print a.lower()
    else
        print a

Submission status: Runtime Error

Solution code:
str = raw_input()

for a in list(str):
    if a.islower():
        print a.upper()
    elif a.isupper():
        print a.lower()
    else
        print a

Submission status: Runtime Error

Solution code:
text = input()

for i in range(len(text)):
    code = ord(text[i])
    if ord('A') <= code <= ord('Z'):
        result += chr(code + 32)
    elif ord('a') <= code <= ord('z'):
        result += chr(code - 32)
    else:
        result += chr(code)

print(result)

Submission status: Runtime Error

Solution code:
print(input.swapcase())

Submission status: Runtime Error

Solution code:
print( sys.stdin.readline().rstrip().swapcase() )

Submission status: Runtime Error

Solution code:
# coding: utf-8

line = raw_input()
for s in line:
    if s.isalpha():
        if s.isupper():
            print s.lower(),
        else:
            print s.upper(),
    else:
       print s,
else print

Submission status: Runtime Error

Solution code:
# coding: utf-8

line = raw_input()
result = ''
for s in line:
    if s.isalpha():
        if s.isupper():
            result += s.lower(),
        else:
            result += s.upper(),
    else:
       print result += s

print result

Submission status: Runtime Error

Solution code:
# coding: utf-8

line = raw_input()
result = ''
for s in line:
    if s.isalpha():
        if s.isupper():
            result += s.lower()
        else:
            result += s.upper()
    else:
       print result += s

print result

Submission status: Runtime Error

Solution code:
using namespace std;
 
typedef long long ll;
 
int main() {
    string str; getline(cin, str);
    for (int i = 0; i < str.size(); ++i) {
        char c = str[i];
        if ('a' <= c && c <= 'z') cout << (char)(c-'a'+'A');
        else if ('A' <= c && c <= 'Z') cout << (char)(c-'A'+'a');
        else cout << c;
    }
    cout << endl;
}

Submission status: Runtime Error

Solution code:
string = input()
for i in string:
    if i.isupper():
        print(i.lower(), end = "")
    elif string[i].islower():
        print(i.upper(), end = "")
    else:
        print(i, end = "")

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print(s.swapcase())

Submission status: Runtime Error

Solution code:
str_atog = "ABCDEFG"
str_hton = "hijklmn"
 
# lower(), upper()????????????????????????
print "??§??????(???) %s ????°???????(???) %s ?????????" % (str_atog, str_atog.lower())
print "?°???????(???) %s ?????§??????(???) %s ?????????" % (str_hton, str_hton.upper())
print
 
arr  = ['And', 'Begin', 'Code', 'Double']
arr2 = ['end', 'flag', 'gem', 'halt']
# for?????§?°???????[??§??????](???)???????´???¨????????????????????????
n_arr = []
for str in arr:
    n_arr.append(str.lower())
print n_arr
 
n_arr2 = []
for str in arr2:
    n_arr2.append(str.upper())
print n_arr2, 'n'
 
# ????????????????????????????????§?????§?°???????[??§??????](???)???????´???¨????????????????????????
print [str.lower() for str in arr]
print [str.upper() for str in arr2]

Submission status: Runtime Error

Solution code:
.lower()
.upper()

Submission status: Runtime Error

Solution code:
print [str.lower() for str in] 
print [str.upper() for str in]

Submission status: Runtime Error

Solution code:
print(input().swa

Submission status: Runtime Error

Solution code:
a = [str(i) for i in range('a, z')]
a.upper()

Submission status: Runtime Error

Solution code:
print(input).swapcase()

Submission status: Runtime Error

Solution code:
ATK = input()

for i in range(len(ATK)):
   if "a" <=ATK[i]<="z":
       print(ATK[i].upper, end='')

    elif "A"<=ATK[i]<="Z":
        print(ATK[i].lower, end='')

    else:
        print(ATK[i], end='')

Submission status: Runtime Error

Solution code:
print(.swapcase())

Submission status: Runtime Error

Solution code:
print(fAIR, LATER, OCCASIONALLY CLOUDY.swapcase())

Submission status: Runtime Error

Solution code:
s=input()
p=input()
print('Yes' if p in s+s else 'No')

Submission status: Runtime Error

Solution code:
print(' '.swapcase(1200))

Submission status: Runtime Error

Solution code:
print(''.swapcase(1200))

Submission status: Runtime Error

Solution code:
print(''.swapcase(<1200))

Submission status: Runtime Error

Solution code:
print(' 'swapcase(1200))

Submission status: Runtime Error

Solution code:
print(' ',swapcase(1200))

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print(s.swapcase(1200))

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print('s'.swapcase())

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print(s.swapcase)

Submission status: Runtime Error

Solution code:
print(' '.swapcase(1200<))

Submission status: Runtime Error

Solution code:
import swapcase
print(' '.swapcase(1200))

Submission status: Runtime Error

Solution code:
import swapcase
print(' '.swapcase())

Submission status: Runtime Error

Solution code:
print(' '.swapcase(0<1200))

Submission status: Runtime Error

Solution code:
print(' '.swapcase())<1200

Submission status: Runtime Error

Solution code:
print(' '.swapcase())0<1200

Submission status: Runtime Error

Solution code:
print(' '.swapcase([<1200]))

Submission status: Runtime Error

Solution code:
print(' '.swapcase((<1200)))

Submission status: Runtime Error

Solution code:
print(''.swapcase((<1200)))

Submission status: Runtime Error

Solution code:
str = [int(i) for i in input().split()]
print(''.swapcase(<1200))

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print(''.swapcase(1200))

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
print('s'.swapcase(1200))

Submission status: Runtime Error

Solution code:
s = [int(i) for i in input().split()]
s = swapcase(1200)
print(s)

Submission status: Runtime Error

Solution code:
"???".swapcase(<1200)

Submission status: Runtime Error

Solution code:
print("???".swapcase(<1200))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(' '.swap())

Submission status: Runtime Error

Solution code:
def main():
    s = raw_input().strip()
    print s.swapcase()

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
fAIR, LATER, OCCASIONALLY CLOUDY.

Submission status: Runtime Error

Solution code:
while 1:
    input = raw_input()
    output = ""

    for i in input:
        if i.islower():
            output += i.upper()
        elif i.isupper():
            output += i.lower()
    
    print(output)

Submission status: Runtime Error

Solution code:
s=input()
for i in range(len(s)):
	if s[i].islower():
		s[i]=s[i].upper()
	elif s[i].isupper():
		s[i]=s[i].lower()
print(s)

Submission status: Runtime Error

Solution code:
list_str2 = [0 for i in range(26)]

while(1):
	list_str1 = list(input())
	print(list_str1)
	if list_str1 == []:
		break
	for i in range(len(list_str1)):
		if 97 <= ord(list_str1[i].lower()) <= 122:
			list_str2[ord(list_str1[i].lower())-97] += 1

for i in range(26):
	print(chr(97+i)+' : '+str(list_str2[i]))

Submission status: Runtime Error

Solution code:
words = input().split(" ")
for word in words:
    for w in word:
       if w.isalpha:
           if w.isupper():
               w.lower()
            else:
                w.upper()
print(",".join(words))

Submission status: Runtime Error

Solution code:
words = input().split(" ")
for word in words:
    for w in word:
       if w.isalpha:
           if w.isupper():
               w.lower()
            elif w.islower:
                w.upper()
print(",".join(words))

Submission status: Runtime Error

Solution code:
words = input().split(",")
for word in words:
    for w in word:
       if w.isalpha:
           if w.isupper():
               w.lower()
            elif w.islower:
                w.upper()
print(",".join(words))

Submission status: Runtime Error

Solution code:
words = input().split(",")
for word in words:
    for w in word:
       if w.isalpha == True:
           if w.isupper() == True:
               w.lower()
            elif w.islower == True:
                w.upper()
print(",".join(words))

Submission status: Runtime Error

Solution code:
words = input().split(",")
for word in words:
    for w in word:
       if w.isalpha == True:
           if w.isupper() == True:
               w.lower()
            elif w.islower == True:
                w.upper()
print(", ".join(words))

Submission status: Runtime Error

Solution code:
swapcase(input())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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(),end='')
    elif "A"<=my_str[i]<="Z":
        sys.stdout.write(my_str[i].lower(),end='')
    else:
        sys.stdout.write(my_str[i],end='')
sys.stdout.write("\n")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = input()
upper(A[0])
for i in range(len(A):
	if i>0:
		lower(A[i])
print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()

print x.upper()

Submission status: Runtime Error

Solution code:

for x in raw_input():
    if x.islower():
        print x.upper()
    elif x.isupper()
        print x.lower()

Submission status: Runtime Error

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

print z

Submission status: WA: Presentation Error

Solution code:
s = input()
ans = [i.upper() if 'a' <= i <= 'z' else i.lower() if 'A' <= i <= 'Z' else i for i in s[:]]
print(*ans, sep='' ,end='')

Submission status: WA: Presentation Error

Solution code:
from string import ascii_lowercase, ascii_uppercase
l = ascii_lowercase
u = ascii_uppercase
def conv(c):
    if c in l:
        return u[l.index(c)]
    if c in u:
        return l[u.index(c)]
    return c
print(*map(conv, open(0).readline()), sep='')

Submission status: WA: Presentation Error

Solution code:
from sys import stdin

s = list(stdin.readline())
for i in range(len(s)):
    if s[i].islower():
        s[i] = s[i].upper()
    elif s[i].isupper():
        s[i] = s[i].lower()

print(*s, sep="")

Submission status: WA: Presentation Error

Solution code:
char = list(input())
for i in range(len(char)):
    if char[i].isupper() == True:
        char[i] = char[i].lower()
    elif char[i].islower() == True:
        char[i] = char[i].upper()
    else:
        continue
for i in range(len(char)):
    print(char[i],end='')

Submission status: WA: Presentation Error

Solution code:
import sys
str = raw_input()
for a in list(str):
    if a.islower():
        sys.stdout.write(a.upper())
    elif a.isupper():
        sys.stdout.write(a.lower())
    else:
        sys.stdout.write(a)

Submission status: WA: Presentation Error

Solution code:
# coding: utf-8

line = raw_input()
for s in line:
    if s.isalpha():
        if s.isupper():
            print s.lower(),
        else:
            print s.upper(),
    else:
       print s,
else:
    print

Submission status: WA: Presentation Error

Solution code:
import sys
word = sys.stdin.readline()
print(word.swapcase())

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
my_str = input()

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

Submission status: WA: Presentation Error

Solution code:
s = input()

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

Submission status: WA: Presentation Error

Solution code:
for k,v in enumerate(list(input())):
    print(v.swapcase(),end='')

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
import sys

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

str = fin.readline()

print(str.swapcase())

Submission status: WA: Presentation Error

Solution code:
#!usr/bin/env python3

import sys


def main():
    print(sys.stdin.readline().swapcase())


if __name__ == '__main__':
    main()

Submission status: WA: Presentation Error

Solution code:
#!usr/bin/env python3

import sys


def main():
    words = sys.stdin.readline().swapcase()
    print(words)


if __name__ == '__main__':
    main()

Submission status: WA: Presentation Error

Solution code:
#!usr/bin/env python3

import sys


def main():
    words = sys.stdin.readline()
    print(words.swapcase())


if __name__ == '__main__':
    main()

Submission status: WA: Presentation Error

Solution code:
#!usr/bin/env python3

import sys


def main():
    words = sys.stdin.readline()
    words = words.swapcase()
    print(words)


if __name__ == '__main__':
    main()

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
string = input()

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

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
s = input()

for i in range(len(s)):
	if "a" <= s[i] <= "z":
		print(s[i].upper(), end="")
	elif "A" <= s[i] <= "Z":
		print(s[i].lower(), end="")
	else:
		print(s[i], end="")
	if i == len(s) - 1:
		print("\n")

Submission status: WA: Presentation Error

Solution code:
s = input()

for i in range(len(s)):
	if "a" <= s[i] <= "z":
		print(s[i].upper(), end="")
	elif "A" <= s[i] <= "Z":
		print(s[i].lower(), end="")
	else:
		print(s[i], end="")

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
s = input()

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

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
s = input()
for h,i in enumerate(list(s)):
    end = ''
    if i == len(s) - 1:
        end = '\n'
    if ord(i) in range(ord('A'), ord('Z')):
        print(i.lower(), end=end)
    elif ord(i) in range(ord('a'), ord('z') + 1):
        print(i.upper(), end=end)
    else:
        print(i, end=end)

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
s=input()
for i in range(len(s)):
    if s[i].islower():
        print(s[i].upper(),end="")
    else:
        print(s[i].lower(),end="")
print("\n")

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
import sys

s = sys.stdin.readline()

print(s.swapcase())

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

Solution code:
char = input()

for i in range(len(char)):
    if "a"<=char[i]<="z":
        print(char[i].upper(),end="")
    elif "A"<=char[i]<="Z":
        print(char[i].lower(),end="")
    else:
        print(char[i],end="")

Submission status: WA: Presentation Error

Solution code:
char = input()
for i in range(len(char)):
    if "a"<=char[i]<="z":
        print(char[i].upper(),end="")
    elif "A"<=char[i]<="Z":
        print(char[i].lower(),end="")
    else:
        print(char[i],end="")

Submission status: WA: Presentation Error

Solution code:
char = input()
for i in range(len(char)):
    if char[i].islower():
        print(char[i].upper(),end="")
    elif char[i].isupper():
        print(char[i].lower(),end="")
    else:
        print(char[i],end="")

Submission status: WA: Presentation Error

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

Submission status: WA: Presentation Error

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)

Submission status: WA: Presentation Error

Solution code:
word_list = list(map(str, input().split()))
c = 0
for i in word_list:
    c += 1
    w =''
    for let in i:
        if (let == '.' and let == ','):
            w = w + let
        elif(let == let.upper()):
            w = w + let.lower()
        elif(let == let.lower()):
            w = w + let.upper()
    if (c == len(word_list)):
        print('{}'.format(w), end = '')
    else:
        print('{}'.format(w), end = ' ')

Submission status: WA: Presentation Error

Solution code:
word_list = list(map(str, input().split()))
c = 0
for i in word_list:
    c += 1
    w =''
    for let in i:
        if (let == '.' or let == ','):
            w = w + let
        elif(let == let.upper()):
            w = w + let.lower()
        elif(let == let.lower()):
            w = w + let.upper()
    if (c == len(word_list)):
        print('{}'.format(w), end = '')
    else:
        print('{}'.format(w), end = ' ')

Submission status: WA: Presentation Error

Solution code:
import sys

for line in sys.stdin:
    print line.swapcase()