def swap_case(s):
    out = ""
    for c in s:
        if (c.islower()):
            a = c.upper()
        else:
            a = c.lower()
        out += a
    return out


if __name__ == '__main__':
    s = input()
    result = swap_case(s)
    print(result)

18f8203e062c707375c42e628b4cf700821fdabc
<mask token>

def swap_case(s):
    out = ''
    for c in s:
        if c.islower():
            a = c.upper()
        else:
            a = c.lower()
        out += a
    return out


<mask token>

def swap_case(s):
    out = ''
    for c in s:
        if c.islower():
            a = c.upper()
        else:
            a = c.lower()
        out += a
    return out


if __name__ == '__main__':
    s = input()
    result = swap_case(s)
    print(result)

def swap_case(s):
    out = ""
    for c in s:
        if (c.islower()):
            a = c.upper()
        else:
            a = c.lower()
        out += a
    return out


if __name__ == '__main__':
    s = input()
    result = swap_case(s)
    print(result)
