def square_area(side):
    sq = side * side
    return sq

assert square_area(0)==0 and square_area(21138)==446815044

Return the area of a square.


Return the area of a square.


def square_perimeter(side):
    par = side * 4
    return par

assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736

Returns the perimeter of a square.


def circle_area(radius):
    cirarea = 3.14 * radius * radius
    return cirarea

Return the area of a circle.


def rectangle_perimeter(length, width):
    rectper = (length + width) * 2
    return rectper

Return the perimeter of a rectangle with the given coordinates.


def circle_circumference(radius):
    circum = 2 * 3.14 * radius
    return circum

assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32

Return the circumference of a circle.


Return the circumference of a circle.


Returns the perimeter of a square.


Return the area of a circle.


def rectangle_perimeter(length, width):
    perimeter = length * 2 + width * 2
    return perimeter


def circle_circumference(radius):
    circumference = 2 * 3.14 * radius
    return circumference

Return the circumference of a circle.


def circle_area(radius):
    area = 3.14 * radius ** 2
    return area

Return the area of a circle.


def square_perimeter(side):
    perimeter = side * 4
    return perimeter

Returns the perimeter of a square.


def square_area(side):
    return side * side

Return the area of a square.


def reverse(a):
    b = []
    i = 0
    while i < len(a):
        b.append(a[len(a) - i - 1])
        i = i + 1
    return b

Iteratively reverse a list of elements.


def reverse(a):
    i = 0
    b = []
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i += 1
    return b

Iteratively reverse a list of elements.


Iteratively reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        print(a[len(a) - i - 1])
        i = i + 1

Iteratively reverse a list of elements.


def reverse(a):
    b = []
    while len(a) != 0:
        b.append(a.pop())
    return b

Iteratively reverse a list of elements.


def reverse(lines):
    import sys
    lines = sys.stdin.readlines()
    return lines

Iteratively reverse a list of elements.


def reverse(test):
    b = []
    i = 0
    while i < len(test):
        b.append(test[len(test) - 1 - i])
        i = i + 1
    return b

Iteratively reverse a list of elements.


Return the area of a square.


def circle_area(n):
    return n * n * 3.14

Return the area of a circle.


def circle_circumference(n):
    return 2 * 3.14 * n

Return the circumference of a circle.


Return the circumference of a circle.


Return the area of a circle.


def rectangle_perimeter(n, m):
    return 2 * (n + m)


def square_perimeter(n):
    return 4 * n

Returns the perimeter of a square.


Returns the perimeter of a square.


def reverse(a):
    i = 0
    while i < len(a):
        return a[::-1]
        i = i + 1

Iteratively reverse a list of elements.


def circumference(r):
    return 2 * 3.141 * r

assert circumference(0)==0.0 and circumference(-23091)==-145057.662

Return the circumference of a circle.


Return the area of a circle with the given coordinates.


def reverse(a):
    i = 0
    tmp = ''
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i += 1

Reverse a list of elements by swapping its elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        while j < len(a):
            if a[j] < a[i]:
                tmp = a[j]
                a[j] = a[i]
                a[i] = tmp
            j += 1
        i += 1
    return a

Sort a list by repeatedly move minimimum of remaining sublist to front.


def swapi(a, i, j):
    if a[j] < a[i]:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        j = i
        while j < len(a):
            swapi(a, i, j)
            j += 1
        i += 1


assert double(0)==0 and double(-7601)==-15202

Double a number or a string.


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def square_area(side):
    return side * side

Return the area of a square.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1
        return a


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest(a, i)
        swap(a, i, p)
        i = i + 1


Double a number or a string.


Return the circumference of a circle.


def circumference(x):
    return 2 * pie * x

Return the circumference of a circle.


def square_area(n):
    sq = n * n
    return sq

Return the area of a square.


def square_perimeter(p):
    sq_p = 4 * p
    return sq_p

Returns the perimeter of a square.


def rectangle_perimeter(a, b):
    rp = 2 * a + 2 * b
    return rp


Return the area of a square.


def circle_circumference(r):
    cc = 2 * 3.14 * r
    return cc

Return the circumference of a circle.


def circle_area(r):
    ca = r * r * 3.14
    return ca

Return the area of a circle.


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = low + (high - low) / 2
        assert low <= mid < high
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low

Search for element q in the sorted array a.


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (high + low) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        assert low <= mid < high
        if a[mid] < q:
            low = mid + 1
            assert low == 0 or a[low - 1] < q
        else:
            high = mid
            assert q <= a[high]
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = low + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        assert low <= mid < high
        if a[mid] < q:
            low = mid + 1
            assert low == 0 or a[low - 1] < a
        else:
            high = mid
            assert q <= a[high]
    return low


def selection_sort(a):
    i = 0
    while i < len(a) - 1:
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def bsearch(a, q):
    low = 0
    high = len(a)
    while high != low:
        mid = (high + low) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    mid = len(a) / 2
    while low < high:
        if q > a[mid]:
            low = mid + 1
        else:
            high = mid
        mid = (low + high) / 2
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
            assert low == 0 or a[low - 1] < q
        else:
            high = mid
            assert q <= a[high]
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) // 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    low = 0
    high = len(a)
    i = 0
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    start = 0
    end = len(a)
    while end > start:
        m = (start + end) / 2
        if a[m] < q:
            start = m + 1
        else:
            end = m
    return start


def rectangle_perimeter(x1, y1, x2, y2):
    perimeter = x1 + y1 + x2 + y2
    return perimeter


def square_area(side):
    return side * side

Return the area of a square.


def circle_area(r):
    area = r * r * 3.14
    return area

Return the area of a circle.


def square_perimeter(s):
    return s * 4

Returns the perimeter of a square.


def circle_circumference(r):
    circumference = 2 * 3.14 * r
    return circumference

Return the circumference of a circle.


Returns the perimeter of a square.


Return the circumference of a circle.


Return the area of a circle.


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    high = len(a)
    low = 0
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


Double a number or a string.


def bsearch(a, q):
    start = 0
    end = len(a)
    while start < end:
        middle = (start + end) / 2
        if a[middle] < q:
            start = middle + 1
        else:
            end = middle
    return start


def reverse(a):
    import sys
    a = sys.stdin.readlines()
    i = 0
    b = []
    while i < len(a):
        f = a[len(a) - i - 1]
        i = i + 1
        b.append(f.rstrip())
    print(b)
    return a

Iteratively reverse a list of elements.


Iteratively reverse a list of elements.


def square_area(side):
    x = side * side
    return x

Return the area of a square.


Return the area of a square.


def circle_area(radius):
    x = 3.14 * (radius * radius)
    return x

Return the area of a circle.


def circle_circumference(radius):
    x = 2 * 3.14 * radius
    return x

Return the circumference of a circle.


def rectangle_perimeter(l, b):
    x = l * 2 + b * 2
    return x


def square_perimeter(side):
    x = side + side + side + side
    return x

Returns the perimeter of a square.


def square_perimeter(side):
    return side * 4

Returns the perimeter of a square.


def circle_area(r):
    return pi * r * r

Return the area of a circle.


Returns the perimeter of a square.


def circle_circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def rectangle_perimeter(l, h):
    return 2 * h + 2 * l


Return the circumference of a circle.


def reverse(a):
    b = []
    i = 0
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i = i + 1
    return b

Iteratively reverse a list of elements.


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def area(r):
    y = pi * r * r
    return y


def reverse(a):
    i = len(a) - 1
    b = []
    while i >= 0:
        b.append(a[i])
        i -= 1
    return b

Iteratively reverse a list of elements.


def square_area(side):
    area = side * side
    return area

Return the area of a square.


def rectangle_perimeter(l, w):
    peri = l + w + l + w
    return peri


def circle_circumference(x):
    circum = 2 * (x * 3.14)
    return circum

Return the circumference of a circle.


def circle_area(r):
    circ = r * r * 3.14
    return circ

Return the area of a circle.


Return the area of a square.


def square_perimeter(a):
    total = a + a + a + a
    return total

Returns the perimeter of a square.


Return the area of a circle.


def square_perimeter(b):
    return b * 4

def square_area(a):
    return a * a

    def square_perimeter(b):
        return b * 4

Return the area of a square.


def circle_area(radius1):
    return 3.14 * radius1 * radius1

Return the area of a circle.


def rectangle_perimeter(side1, side2):
    return side1 * 2 + side2 * 2


def square_perimeter(b):
    return b * 4

Returns the perimeter of a square.


Returns the perimeter of a square.


def circle_circumference(radius):
    return 2 * 3.14 * radius

Return the circumference of a circle.


Return the circumference of a circle.


Double a number or a string.


def circumference(x):
    return 2 * 3.141 * x

Return the circumference of a circle.


def swap(a, i, p):
    tmp = a[i]
    a[i] = a[p]
    a[p] = tmp

def findsmall(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j += 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = findsmall(a, i)
        swap(a, i, p)
        i += 1
    return a


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def reverse(a):
    n = len(a)
    i = 0
    while i < n / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    n = len(a)
    while i < n:
        p = i
        j = i + 1
        while j < n:
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def double(x):
    y = x * 2
    return y

Double a number or a string.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i += 1


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def area(r):
    y = pi * r * r
    return y


def selection_sort(a):
    i = 0
    j = 1
    while j < len(a):
        if a[j] < a[i]:
            tmp = a[j]
            a[j] = a[i]
            a[i] = tmp
            if i != 0:
                i -= 1
                j -= 1
        else:
            i += 1
            j += 1


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def square_area(side):
    return side * side

Return the area of a square.


Return the area of a square.


def square_area(n):
    area = n * n
    return area

Return the area of a square.


def square_area(side):
    sq = side * side
    return sq

Return the area of a square.


def square_area(n):
    side = n * n
    return side

Return the area of a square.


def square_area(n):
    ans = n * n
    return ans

Return the area of a square.


def square_area(n):
    n = n * n
    return n

Return the area of a square.


def square_area(x):
    area = x * x
    return area

Return the area of a square.


def square_area(n):
    sq = n * n
    return sq

Return the area of a square.


def square_area(x1, y1, x2, y2):
    dx = x1 - x2
    dy = y1 - y2
    area = dx * dy
    if 0 <= area:
        return area
    else:
        return -area

Return the area of a square.


def rectangle_perimeter(a, b):
    return 2 * a + 2 * b


def circle_circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def circle_area(r):
    return pi * r * r

Return the area of a circle.


Return the area of a circle.


Return the circumference of a circle.


def rectangle_perimeter(a, b):
    return 2 * a + 2 * b

def square_perimeter(n):
    return rectangle_perimeter(n, n)

Returns the perimeter of a square.


Returns the perimeter of a square.


def rectangle_perimeter(x, y):
    return x + x + y + y


def square_perimeter(x):
    return x * 4

Returns the perimeter of a square.


Return the area of a square.


def circle_circumference(x):
    return 2 * 3.14 * x

Return the circumference of a circle.


def circle_area(x):
    return 3.14 * (x * x)

Return the area of a circle.


def square_perimeter(j):
    perimeter = j + j + j + j
    return perimeter

Returns the perimeter of a square.


def circle_area(k):
    area = 3.14 * (k * k)
    return area

Return the area of a circle.


def rectangle_perimeter(l, h):
    perimeter = l + l + h + h
    return perimeter


def square_area(n):
    side = n * n
    return side

Return the area of a square.


def circle_circumference(m):
    circumference = 2 * 3.14 * m
    return circumference

Return the circumference of a circle.


def circle_area(i):
    area = 3.14 * (i * i)
    return area

Return the area of a circle.


def square_perimeter(j):
    per = j * 4
    return per

Returns the perimeter of a square.


def rectangle_perimeter(a, b):
    rper = 2 * a + 2 * b
    return rper


Return the area of a circle.


def square_area(side):
    return side * side

Return the area of a square.


def circle_circumference(n):
    circumference = 2 * 3.14 * n
    return circumference

Return the circumference of a circle.


Return the circumference of a circle.


def circle_area(n):
    area = 3.14 * (n * n)
    return area

Return the area of a circle.


def rectangle_perimeter(m, n):
    perimeter = m + m + n + n
    return perimeter


def square_perimeter(n):
    perimeter = n + n + n + n
    return perimeter

Returns the perimeter of a square.


Returns the perimeter of a square.


def square_area(n):
    ans = n * n
    return ans

Return the area of a square.


def rectangle_perimeter(n, m):
    ans = n + n + m + m
    return ans


def square_perimeter(n):
    ans = n + n + n + n
    return ans

Returns the perimeter of a square.


def circle_area(n):
    ans = n * n * 3.14
    return ans

Return the area of a circle.


def circle_circumference(n):
    ans = 2 * 3.14 * n
    return ans

Return the circumference of a circle.


Return the area of a square.


def square_area(n):
    sq = n * n
    return sq

Return the area of a square.


def square_perimeter(n):
    return n * 4

Returns the perimeter of a square.


def rectangle_perimeter(a, b):
    return a + a + b + b


def circle_area(n):
    return n * n * 3.14

Return the area of a circle.


Return the area of a circle.


def circle_circumference(n):
    return n * 2 * 3.14

Return the circumference of a circle.


Return the circumference of a circle.


def circle_area(l):
    return 3.14 * (l * l)

Return the area of a circle.


def circle_circumference(t):
    return 2 * 3.14 * t

Return the circumference of a circle.


def rectangle_perimeter(s, v):
    return 2 * v + 2 * s


def square_perimeter(m):
    return m * 4

Returns the perimeter of a square.


Returns the perimeter of a square.


def circle_area(r):
    circlearea = r * r
    carea = 3.14 * circlearea
    return carea

Return the area of a circle.


def circle_circumference(b):
    cir = 2 * 3.14 * b
    return cir

Return the circumference of a circle.


def square_area(n):
    area = n * n
    return area

Return the area of a square.


def square_perimeter(a):
    per = a * 4
    return per

Returns the perimeter of a square.


def rectangle_perimeter(x, y):
    side1 = x * 2
    side2 = y * 2
    rper = side1 + side2
    return rper


Return the area of a square.


def circle_area(r):
    return 3.14 * (r * r)

Return the area of a circle.


def rectangle_perimeter(l, w):
    return 2 * (l + w)


def circle_circumference(r):
    return 2 * 3.14 * r

Return the circumference of a circle.


def square_perimeter(l):
    return l + l + l + l

Returns the perimeter of a square.


def square_area(side):
    return side * side

Return the area of a square.


def rectangle_perimeter(side, side2):
    return 2 * side + 2 * side2


def circle_area(side):
    return side * side * 3.14

Return the area of a circle.


def square_perimeter(side):
    return 4 * side

Returns the perimeter of a square.


def circle_circumference(side):
    return 2 * side * 3.14

Return the circumference of a circle.


Return the area of a circle.


Return the circumference of a circle.


def circle_circumference(a):
    return 2 * 3.14 * a

Return the circumference of a circle.


def rectangle_perimeter(a, b):
    return a + a + b + b


def circle_area(a):
    return a * a * 3.14

Return the area of a circle.


def square_perimeter(a):
    return a + a + a + a

Returns the perimeter of a square.


def circle_circumference(n):
    return n * 2 * 3.14

Return the circumference of a circle.


Return the area of a square.


def circle_area(n):
    return n * n * 3.14

Return the area of a circle.


def square_perimeter(n):
    return n + n + n + n

Returns the perimeter of a square.


Returns the perimeter of a square.


def square_perimeter(side):
    return side + side + side + side

Returns the perimeter of a square.


def circle_area(r):
    return r * r * 3.14

Return the area of a circle.


def square_perimeter(n):
    return n * 4

Returns the perimeter of a square.


def circle_circumference(n):
    return 2 * 3.14 * n

Return the circumference of a circle.


def rectangle_perimeter(n, side2):
    return 2 * n + 2 * side2


def rectangle_perimeter(n, m):
    return n + n + m + m


Return the area of a circle.


Return the circumference of a circle.


def circle_area(b):
    b = b * b * 3.14
    return b

Return the area of a circle.


def square_area(n):
    n = n * n
    return n

Return the area of a square.


def circle_circumference(c):
    c = 2 * 3.14 * c
    return c

Return the circumference of a circle.


def square_perimeter(a):
    a = a * 4
    return a

Returns the perimeter of a square.


def rectangle_perimeter(d, e):
    d = d + d
    e = e + e
    return d + e


Return the area of a square.


def square_perimeter(side):
    return 4 * side

Returns the perimeter of a square.


def square_area(side):
    return side * side

Return the area of a square.


def circle_circumference(r):
    return r * 2 * 3.14

Return the circumference of a circle.


Returns the perimeter of a square.


def rectangle_perimeter(l, w):
    return 2 * (l + w)


def circle_area(a):
    return 3.14 * a ** 2

Return the area of a circle.


def square_perimeter(l):
    return 4 * l

Returns the perimeter of a square.


def rectangle_perimeter(c):
    return (c + c) * 2


def circle_circumference(b):
    return 2 * 3.14 * b

Return the circumference of a circle.


Return the area of a circle.


def square_perimeter(a):
    a = 4 * a
    return a

Returns the perimeter of a square.


Return the circumference of a circle.


def rectangle_perimeter(l, w):
    l = l + l
    w = w + w
    return l + w


def rectangle_perimeter(l, w):
    return 2 * l + 2 * w


def circle_area(r):
    return r * r * 3.14

Return the area of a circle.


def circle_circumference(s):
    return 2 * 3.14 * s

Return the circumference of a circle.


def square_perimeter(q):
    return q * 4

Returns the perimeter of a square.


Return the area of a square.


def circle_area(radius):
    area = 3.14 * (radius * radius)
    return area

Return the area of a circle.


def circle_circumference(radius):
    circumference = 2 * 3.14 * radius
    return circumference

Return the circumference of a circle.


def square_area(side):
    sq = side * side
    return sq

Return the area of a square.


def square_perimeter(side):
    per = side * 4
    return per

Returns the perimeter of a square.


def rectangle_perimeter(length, width):
    rp = 2 * (length + width)
    return rp


Returns the perimeter of a square.


def circle_circumference(r):
    return r * 2 * 3.14

Return the circumference of a circle.


def square_perimeter(side):
    return 4 * side

Returns the perimeter of a square.


def rectangle_perimeter(l, w):
    return 2 * (l + w)


def square_area(side):
    return side * side

Return the area of a square.


def circle_circumference(r):
    return 2 * r * 3.14

Return the circumference of a circle.


def square_perimeter(r):
    return 4 * r

Returns the perimeter of a square.


def rectangle_perimeter(x, y):
    return 2 * x + 2 * y


Return the area of a circle.


def reverse(test):
    b = []
    i = 0
    while i < len(test):
        b.append(test[len(test) - 1 - i])
        i = i + 1
    return b

Iteratively reverse a list of elements.


Double a number or a string.


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        t = a[i]
        a[i] = a[j]
        a[j] = t
        i = i + 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def double(x):
    y = x * 2
    return y

Double a number or a string.


def double(n):
    y = n * 2
    return y

Double a number or a string.


Return the circumference of a circle.


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def area(r):
    y = pi * r * r
    return y


def circumference(r):
    return 2 * 3.141 * r

Return the circumference of a circle.


def area(r):
    a = pi * r * r
    return a


def circumference(r):
    c = 2 * pi * r
    return c

Return the circumference of a circle.


def circumference(r):
    return 2 * PI * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    for i in range(len(a) / 2):
        swap(a, i, len(a) - i - 1)


def circumference(r):
    return 2 * r * pi

Return the circumference of a circle.


def circumference(x):
    y = 2 * pi * x
    return y

Return the circumference of a circle.


def area(x):
    y = pi * x * x
    return y


Double a number or a string.


def double(n):
    n = n * 2
    return n

Double a number or a string.


def circumference(n):
    return 2 * pi * n

Return the circumference of a circle.


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def circumference(r):
    return pi * r * 2

Return the circumference of a circle.


def circumference(r):
    y = 2 * 3.141 * r
    return y

Return the circumference of a circle.


def area(r):
    y = 3.141 * r * r
    return y


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def double(x):
    y = x * 2
    return y

Double a number or a string.


def area(r):
    y = pi * r * r
    return y


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1


def double(n):
    y = n * 2
    return y

Double a number or a string.


Return the circumference of a circle.


def circumference(r):
    return r * 2 * pi

Return the circumference of a circle.


def circumference(r):
    return 2 * 3.141 * r

Return the circumference of a circle.


def area(r):
    y = 3.141 * int(r) ** 2
    return y


def circumference(r):
    y = 2 * 3.141 * int(r)
    return y

Return the circumference of a circle.


def circumference(r):
    return r * 2 * 3.141

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        p = i
        while j < len(a):
            if a[p] >= a[j]:
                p = j
            j += 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i += 1


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i += 1


Double a number or a string.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    for i in range(0, len(a) / 2):
        swap(a, i, len(a) - i - 1)


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def circumference(n):
    return pi * n * 2

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def selection_sort(a):
    for i in range(len(a)):
        smallest = i
        for j in range(i, len(a)):
            if a[j] < a[smallest]:
                smallest = j
        swap(a, i, smallest)
    return a


Return the circumference of a circle.


def swap(a, x, y):
    tmp = a[x]
    a[x] = a[y]
    a[y] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1
    return a


def double(n):
    y = 2 * n
    return y

Double a number or a string.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1
    return a


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i += 1
    return a


def double(n):
    double_val = n * 2
    return double_val

Double a number or a string.


def selection_sort(a):
    return a.sort()


def circumference(r):
    return 2 * 3.141 * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1
    return a


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1


def circumference(r):
    ans = 2 * pi * r
    return ans

Return the circumference of a circle.


def area(r):
    ans = pi * r ** 2
    return ans


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1
    return a


def double(n):
    m = n * 2
    return m

Double a number or a string.


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def area(r):
    y = pi * r ** 2
    return y


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    b = 0
    while b < len(a) / 2:
        swap(a, b, len(a) - b - 1)
        b += 1
    return a


Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i <= j:
        swap(a, i, j)
        i = i + 1
        j = j - 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    k = 0
    while k < len(a) / 2:
        swap(a, k, len(a) - k - 1)
        k += 1


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1
    return a


def circumference(c):
    return 2 * 3.141 * c

Return the circumference of a circle.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def circumference(r):
    actual_circumference = 2 * 3.141 * r
    return actual_circumference

Return the circumference of a circle.


def area(r):
    actual_area = 3.141 * r ** 2
    return actual_area


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i += 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        p = i
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        swap(a, i, p)
        i += 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def swap(a, x, y):
    tmp = a[x]
    a[x] = a[y]
    a[y] = tmp
    return a

def selection_sort(a):
    k = 0
    while k < len(a):
        j = k + 1
        p = k
        tmp = 0
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        swap(a, k, p)
        k += 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        p = i
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1
    return a


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def circumference(r):
    y = 3.141 * 2 * r
    return y

Return the circumference of a circle.


def area(a):
    x = 3.141 * a ** 2
    return x


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1


def selection_sort(a):
    for i in range(0, len(a)):
        p = i
        curr_low = p
        while p < len(a):
            if a[p] < a[curr_low]:
                curr_low = p
            p += 1
        tmp = a[i]
        a[i] = a[curr_low]
        a[curr_low] = tmp


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1


Double a number or a string.


def selection_sort(a):
    p = 0
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def circumference(r):
    q = 2 * 3.141 * r
    return q

Return the circumference of a circle.


def area(r):
    s = 3.141 * r ** 2
    return s


def selection_sort(a):
    i = 0
    while i < len(a) - 1:
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i = i + 1


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i += 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1
    return a


def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        minimum = i
        while j < len(a):
            if a[j] < a[minimum]:
                minimum = j
            j += 1
        tmp = a[minimum]
        a[minimum] = a[i]
        a[i] = tmp
        i += 1
    return a


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def reverse(a):
    a.reverse()
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i += 1


def find_smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest(a, i)
        swap(a, i, p)
        i += 1
    return a


def selection_sort(a):
    p = 0
    j = 0
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def area(r):
    y = pi * r ** 2
    return y


def circumference(r):
    y = 2 * pi * r
    return y

Return the circumference of a circle.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a


def swap(a, i, j):
    a[i], a[j] = a[j], a[i]
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i
        while j < len(a):
            if a[j] < a[i]:
                a[i], a[j] = a[j], a[i]
            j += 1
        i += 1
    return a


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a


Double a number or a string.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i <= j:
        swap(a, i, j)
        i = i + 1
        j = j - 1


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1
    return a


def circumference(n):
    return 2 * 3.141 * n

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1


Return the circumference of a circle.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1


def selection_sort(a):
    i = 0
    j = 1
    while i < len(a):
        j = i
        while j < len(a):
            if a[j] < a[i]:
                tmp = a[j]
                a[j] = a[i]
                a[i] = tmp
            j = j + 1
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        print(tmp)
        i += 1
        return tmp


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def find_smallest_value(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j += 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_value(a, i)
        swap(a, i, p)
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1
    return a


Double a number or a string.


def circumference(r):
    return 2 * 3.141 * r

Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i <= j:
        swap(a, i, j)
        i += 1
        j = j - 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1


def smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j += 1
    return p

def swap(a, i, p):
    tmp = a[p]
    a[p] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = smallest(a, i)
        swap(a, i, p)
        i += 1
    return a


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1
    return a


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def double(n):
    y = n * 2
    return y

Double a number or a string.


Return the circumference of a circle.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, len(a) - 1 - i, i)
        i = i + 1
    return a


def swap(a, i, p):
    tmp = a[i]
    a[i] = a[p]
    a[p] = tmp

def findsmallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j += 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = findsmallest(a, i)
        swap(a, i, p)
        i += 1
    return a


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i != j:
        swap(a, i, j)
        i += 1
        j -= 1


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2 - 1:
        swap(a, i, j)
        i += 1
        j -= 1


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        temp = a[i]
        a[i] = a[p]
        a[p] = temp
        i += 1


def reverse(list):
    reversed = []
    i = len(list) - 1
    while i >= 0:
        reversed.append(list[i])
        i = i - 1
    return reversed

Iteratively reverse a list of elements.


Iteratively reverse a list of elements.


def find_smallest(a, i):
    p = i
    q = i + 1
    while q < len(a):
        if a[q] < a[p]:
            p = q
        q += 1
    return p

def swap(a, i, p):
    tmp = a[p]
    a[p] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest(a, i)
        swap(a, i, p)
        i += 1


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def double(x):
    y = x * 2
    return y

Double a number or a string.


def circumference(r):
    y = 2 * pi * r

Return the circumference of a circle.


def bsearch(a, q):
    low = 0
    high = len(a)
    while low < high:
        mid = low + (high - low) / 2
        if a[mid] < q:
            low = mid + 1
        else:
            high = mid
    return low


def bsearch(a, q):
    high = len(a)
    low = 0
    while low < high:
        mid = (low + high) / 2
        if a[mid] < q:
            low = mid + 1
            assert low == 0 or a[low - 1] < q
        else:
            high = mid
            assert q <= a[high]
    return low


Double a number or a string.


def circumference(r):
    return 3.14 * r * 2

Return the circumference of a circle.


def circumference(r):
    return 3.141 * r * 2

Return the circumference of a circle.


Return the circumference of a circle.


def circumference(r):
    return 2 * pi * r

Return the circumference of a circle.


def square_area(side):
    sq = side * side
    return sq

Return the area of a square.


Return the area of a square.


def circle_circumference(r):
    return r * 2 * 3.14

Return the circumference of a circle.


def circle_area(r):
    return r * r * 3.14

Return the area of a circle.


Return the area of a circle.


def rectangle_perimeter(l, w):
    return 2 * (l + w)


def square_perimeter(side):
    return 4 * side

Returns the perimeter of a square.


Returns the perimeter of a square.


def square_area(side):
    return side * side

Return the area of a square.


def double(n):
    m = n * 2
    print(m)

Double a number or a string.


def swap_keys_values(d):
    return dict([(v, k) for k, v in list(d.items())])

Swap the keys of a dictionary with its values.


def swap_unique_keys_values(d):
    return dict([(v, k) for k, v in list(d.items()) if list(d.values()).
        count(v) == 1])

Swap the keys of a dictionary with its unique values.


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if v not in list(d.values())}


def swap_keys_values(d):
    d2
    for key in d:
        d2[d[key]] = key
    return d2


def swap_keys_values(d):
    d2 = {}
    for key in d:
        d2[d[key]] = key
    return d2


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if value not in list(d.values()):
            new_d[key] = value
    return new_d


def swap_keys_values(d):
    for key in d:
        d[key] = key
    return d


def swap_unique_keys_values(d):
    new_d = {}
    print(list(d.values()))
    for key, value in list(d.items()):
        print(value)
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if value not in list(d.values()):
            new_d[value] = key
    return new_d


def swap_keys_values(d):
    return {k: v for k, v in list(d.items())}


def swap_unique_keys_values(d):
    d2 = {}
    for key in d:
        if d[key] in d2:
            del d2[d[key]]
        else:
            d2[d[key]] = key
    return d2


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if int(value) not in list(d.values()):
            new_d[value] = key
    return new_d


def swap_keys_values(d):
    new_dict = {v: k for k, v in list(d.items())}
    return new_dict


def swap_unique_keys_values(d):
    new_d = {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_keys_values():
    print({v: k for k, v in list(d.items())})


def swap_keys_values(k, v):
    print({v: k for k, v in list(d.items())})


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) != 1}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_keys_values(d):
    return {(v, k) for k, v in list(d.items())}


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    return {v: k for v, k in list(d.items())}


def swap_keys_values(d):
    return {k: v for v, k in list(d.items())}


def swap_unique_keys_values(d):
    lst = [x for x in list(d.values())]
    new_dict = {v: k for k, v in list(d.items()) if lst.count(v) == 1}
    return new_dict


def swap_keys_values(d):
    return {v: k for k, v in d}


def swap_unique_keys_values(d):
    store = {}
    for key in d:
        for k in d:
            if d[key] == d[k]:
                0
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    for key in d:
        for k in d:
            if d[key] == d[k]:
                continue
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if d[key] == di[k]:
                continue
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d[0:-1]:
        for k in di[1:]:
            if d[key] == di[k]:
                continue
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d[0:len(d) - 1]:
        for k in di[1:]:
            if d[key] == di[k]:
                continue
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if d.values.count(k) > 1}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if d[key] == di[k]:
                0
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if di[k] == d[key]:
                0
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if di[k] == d[key]:
                0
            else:
                store[k] = d[k]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(k) > 1}


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if di[k] == d[key]:
                break
            else:
                store[key] = d[key]
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if value not in list(d.values()):
            new_d[value] = key
    return new_d


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(k) == 1}


def swap_keys_values(d):
    return {v: k for k, v in list(my_dict.items())}


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if v not in list(d.values())}


def swap_keys_values(dictionary):
    dictionary = {v: k for k, v in list(dictionary.items())}
    return dictionary


def swap_unique_keys_values(d):
    store = {}
    for k, v in list(d.items()):
        if d.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_keys_values(d):
    {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    store = {}
    for k, v in list(d.items()):
        print(d.count(v))
        if d.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(list(d.values()).count
        (k) >= 1)}


def swap_keys_values(d):
    new_dict = {v: k for k, v in list(d.items())}
    print(sorted(new_dict.items()))


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if v not in list(d.keys())}


def swap_unique_keys_values(d):
    store = {}
    print(list(d.values()))
    for k, v in list(d.items()):
        print(d.count(v))
        if d.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    for k, v in list(d.items()):
        if d.count(d.values) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(list(d.values()).count
        (v) == 1)}


def swap_unique_keys_values(d):
    store = {}
    for k, v in list(d.items()):
        if d.values.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    store = {}
    for k, v in list(d.items()):
        if list(d.values()).count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_keys_values(d):
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    store = {}
    va = list(d.values())
    print(va)
    for k, v in list(d.items()):
        if va.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_unique_keys_values(d):
    store = {}
    val = []
    va = list(d.values())
    for i in va:
        val = va.append(i)
    for k, v in list(d.items()):
        if va.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    val = []
    va = list(d.values())
    for i in va:
        val.append(i)
    for k, v in list(d.items()):
        if va.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    val = []
    va = list(d.values())
    for i in va:
        val.append(i)
    print(val)
    for k, v in list(d.items()):
        if va.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    val = []
    va = list(d.values())
    for i in va:
        val.append(i)
    print(val)
    for k, v in list(d.items()):
        if val.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    store = {}
    val = []
    va = list(d.values())
    for i in va:
        val.append(i)
    for k, v in list(d.items()):
        if val.count(v) == 1:
            store[k] = v
    return {v: k for k, v in list(store.items())}


def swap_unique_keys_values(d):
    for pairs in zip(list(d.values()), list(d.items())):
        print(pairs)


def unique(data):
    previous = []
    new = []
    for integer in data:
        if integer not in new and integer not in previous:
            new.append(integer)
        elif integer not in new and integer in previous:
            continue
        elif integer in new and integer not in previous:
            previous.append(integer)
            new.remove(integer)
    return new

def swap_unique_keys_values(d):
    values = [n for n in list(d.values())]
    special = unique(values)
    return {v: k for k, v in list(d.items()) if v in special}


def swap_unique_keys_values(d):
    new_d = {}
    for k, v in list(d.items()):
        if not v in new_d:
            new_d[v] = k
        else:
            del new_d[v]
    return new_d


def swap_keys_values(k, v):
    return {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    my_dict = d
    new_dict = {v: k for k, v in list(my_dict.items())}
    return new_dict


def swap_keys_values(dict):
    return {v: k for k, v in list(dict.items())}


def swap_unique_keys_values(dict):
    return {v: k for k, v in list(dict.items()) if dict.values.count(v) == 1}


def swap_unique_keys_values(dict):
    return {v: k for k, v in list(dict.items()) if list(dict.values()).
        count(v) == 1}


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    for k, v in list(d.items()):
        if values.count(v) == 1:
            d2[v] = k
    print(d2)


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    d2 = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]
    print(d2)


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    d2 = [(v, k) for k, v in sorted(d.items()) if values.count(v) == 1]
    print(d2)


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    d2 = [(v, k) for k, v in list(sorted(d).items()) if values.count(v) == 1]
    print(d2)


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    print(sorted(d.items()))


def swap_unique_keys_values(d):
    d2 = {}
    values = list(d.values())
    sort = sorted(d.items())
    d2 = [(v, k) for k, v in sort if values.count(v) == 1]
    print(d2)


def swap_unique_keys_values(d):
    values = list(d.values())
    l = [(k, v) for k, v in list(d.items()) if values.count(v) == 1]
    print(sorted(l))


def swap_unique_keys_values(d):
    values = list(d.values())
    l = [(v, k) for k, v in list(d.items()) if values.count(v) == 1]
    print(sorted(l))


def swap_unique_keys_values(d):
    values = list(d.values())
    items = list(d.items())
    l = [(v, k) for k, v in items if values.count(v) == 1]
    print(sorted(l))


def swap_unique_keys_values(d):
    print(d)
    values = list(d.values())
    items = list(d.items())
    l = [(v, k) for k, v in items if values.count(v) == 1]
    print(sorted(l))


def swap_unique_keys_values(d):
    values = list(d.values())
    items = list(d.items())
    l = [(v, k) for k, v in items if values.count(v) == 1]
    return sorted(l)


def swap_unique_keys_values(d):
    values = list(d.values())
    items = list(d.items())
    l = {v: k for k, v in items if values.count(v) == 1}
    return sorted(l)


def swap_unique_keys_values(d):
    print(d)


def swap_unique_keys_values(d):
    print(d)
    print(list(d.values()))


def swap_unique_keys_values(d):
    print(d)
    values = list(d.values())
    print(sorted(d.items()))


def swap_unique_keys_values(d):
    print(d)
    values = list(d.values())
    print(list(d.items()))


def swap_unique_keys_values(d):
    values = list(d.values())
    items = [(y, x) for x, y in list(d.items())]
    d2 = {v: k for k, v in sorted(items)}
    return d2


def swap_unique_keys_values(d):
    values = list(d.values())
    items = [(y, x) for x, y in list(d.items())]
    d2 = {k: v for k, v in sorted(items)}
    return d2


def swap_unique_keys_values(d):
    values = list(d.values())
    items = [(y, x) for x, y in list(d.items())]
    d2 = {v: k for v, k in sorted(items) if values.count(v) == 1}
    return d2


def swap_keys_values(d):
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.keys()):
        if list(d.keys()).count(w) > 1:
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            m = w
            d.popitem(d[w])
    d.popitem(d[m])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            m = w
            d.popitem(d[w])
        d.popitem(d[m])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        m = ''
        if list(d.items()).count(w) > 1:
            m = w
            d.popitem(d[w])
        d.popitem(d[m])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    print(lies(list(d.items())))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    print(list(d.items()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    print(list(d.keys()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    print(list(d.keys()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    return d


def swap_unique_keys_values(d):
    print(list(d.items()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
    return d


def swap_unique_keys_values(d):
    print(list(d.items()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])


def swap_unique_keys_values(d):
    print(list(d.items()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            for s in list(d.items()):
                if d[s] == d[w]:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            for s in list(d.items()):
                if d[s] == d[w]:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            for s in list(d.items()):
                if d[s] == d[w]:
                    d.popitem(d[s])
            d.popitem(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
            for s in list(d.items()):
                if d[s] == w:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    print(list(d.items()))
    for w in list(d.items()):
        if list(d.items()).count(w) > 1:
            d.popitem(d[w])
            for s in list(d.items()):
                if d[s] == w:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = list(d.items())
    for w in items:
        if items.count(w) > 1:
            d.popitem(d[w])
            for s in items:
                if d[s] == w:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = list(d.items())
    for w in items:
        if items.count(w) > 1:
            d.popitem(d[w])
            for s in items:
                if s == w:
                    d.popitem(d[s])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_keys_values(dict):
    new_dict = {v: k for k, v in list(dict.items())}
    print(new_dict)


def swap_keys_values(dict):
    new_dict = {v: k for k, v in list(dict.items())}
    print(list(new_dict.items()))


def swap_keys_values(dict):
    new_dict = {v: k for k, v in list(dict.items())}
    print([new_dict])


def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}
    print([new_dict])
    for k in new_dict:
        l.append('({} : {})'.format(k, new_dict[k]))
    print(l)


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({} : {})'.format(k, new_dict[k]))
    print(sorted(l, key=my_function))


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({} : {})'.format(k, new_dict[k]))
    print('[' + ', '.join(sorted(l, key=my_function)) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({} : {})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')
    print(type(l[1]))


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({} : {})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({}, : {})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({}, {})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({},  {})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({},  {:2s})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({},  {:>2s})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append('({}, {:>2s})'.format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append("({}, '{:>2s}')".format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append("({}, '{}')".format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-2))) + ']')


def my_function(a):
    return a[1]

def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}

    def my_function(a):
        return a[1]
    for k in new_dict:
        l.append("({}, '{}')".format(int(k), new_dict[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')


def swap_keys_values(dict):
    l = []
    new_dict = {v: k for k, v in list(dict.items())}
    new_dict1 = new_dict.copy()
    for k in new_dict1:
        l.append("({}, '{}')".format(int(k), new_dict1[k]))
    print('[' + ', '.join(sorted(l, key=itemgetter(-3))) + ']')


def swap_keys_values(a):
    l = []
    new_dict = {v: k for k, v in list(a.items())}
    return sorted(new_dict.items())


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    return sorted(new_dict.items())


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    pprint(new_dict)


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    pprint(sorted(new_dict.items()))
    return new_dict


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    print(sorted(new_dict.items()))
    return new_dict


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    return sorted(new_dict.items())
    return new_dict


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    print(type(sorted(new_dict.items())))
    return new_dict


def swap_keys_values(d):
    new_d = {}
    for key in d:
        new_d[d[key]] = key
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    for key in d:
        if list(d.values()).count(d[key]) == 1:
            new_d[d[key]] = key
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = []
    for key in d:
        for value in list(d.values()):
            a.append(value)
        if a.count(d[key]) == 1:
            new_d[d[key]] = key
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = []
    for value in list(d.values()):
        a.append(value)
    for key in d:
        if a.count(d[key]) == 1:
            new_d[d[key]] = key
    return new_d


def swap_keys_values(d):
    new_dict = {v: k for k, v in list(d.items())}
    return new_dict


def swap_unique_keys_values(d):
    return d


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if v not in list(d.values())}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if 'a' not in list(d.items())}


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    l = []
    m = []
    for v in list(d.values()):
        if v in l:
            m.append(v)
        else:
            l.append(v)
    return {v: k for k, v in list(d.items()) if v not in m}


def swap_keys_values(d):
    d = {v: k for k, v in list(d.items())}
    return d
    if __name__ == '__main__':
        main()


def swap_keys_values(s):
    for k, v in list(my_dict.items()):
        del my_dict[k]
        my_dict[v] = k
    print(my_dict)


def swap_keys_values(d):
    {v: k for k, v in d.items}
    return d


def swap_keys_values(d):
    new_dict = {}
    for pair in list(d.items()):
        new_dict[pair[1]] = pair[0]
    return new_dict


def swap_unique_keys_values(d):
    new_dict = {}
    for pair in list(d.items()):
        if pair[1] not in new_dict:
            new_dict[pair[1]] = pair[0]
    return new_dict


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if value not in list(new_d.values()):
            new_d[key] = value
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    for key, value in list(d.items()):
        if value not in list(new_d.values()):
            new_d[value] = key
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    keys = list(set(d.keys()))
    values = list(set(d.values()))
    i = 0
    while i < len(keys):
        new_d[values[i]] = keys[i]
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    keys = list(set(d.keys()))
    values = list(set(d.values()))
    i = 0
    while i < len(keys):
        new_d[values[i]] = keys[i]
        i = i + 1
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    keys = list(set(d.keys()))
    values = list(set(d.values()))
    print((keys, values))


def swap_unique_keys_values(d):
    new_d = {}
    a = list(set(d.values()) & set(d.values()))
    for k, v in list(d.items()):
        if v not in a:
            new_d[v] = k
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = list(set(d.values()) & set(d.values()))
    print(a)
    for k, v in list(d.items()):
        if v not in a:
            new_d[v] = k
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = list(d.values()) - list(set(d.values))
    print(a)
    for k, v in list(d.items()):
        if v not in a:
            new_d[v] = k
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = list(d.values()) - (list(set(d.values())) - list(d.values()))
    print(a)
    for k, v in list(d.items()):
        if v not in a:
            new_d[v] = k
    return new_d


def swap_unique_keys_values(d):
    new_d = {}
    a = set(d.values()) | set(d.values())
    print(a)


def swap_unique_keys_values(d):
    new_d = {}
    a = set(d.values()) & set(d.values())
    print(a)


def swap_unique_keys_values(d):
    new_d = {}
    a = list(d.values()) - list(set(d.values()))
    print(a)


def swap_unique_keys_values(d):
    new_d = {}
    a = list(d.values()) - set(d.values())
    print(a)


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if [v for v in list(d.values()
        )].count(v) == 1}


def swap_keys_values(d_0):
    d = {}
    for key in d_0:
        d[d_0[key]] = key
    return d


def swap_unique_keys_values(d_0):
    d = {}
    for key in d_0:
        d[d_0[key]] = key
    return d


def swap_unique_keys_values(d_0):
    d = {}
    for key in d_0:
        if d_0[key] not in d:
            d[d_0[key]] = key
        else:
            del d[d_0[key]]
    return d


def swap_keys_values(d):
    {v: k for k, v in d.items}
    return d


def swap_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    return new_dict


def swap_unique_keys_values(d):
    keys = []
    values = []
    dict_keys = []
    dict_values = []
    dump = []
    for k, v in list(d.items()):
        keys.append(k)
        values.append(v)
    for num in values:
        test = num
        values = values[1:]
        if test in values:
            dump.append(test)
        elif test not in values and test not in dump:
            dict_keys.append(test)
            dict_values.append(keys[0])
        keys = keys[1:]
    print(dict_keys)
    print(dict_values)
    d = {}
    i = 0
    while i < len(dict_keys):
        d[dict_keys[i]] = dict_values[i]
        i = i + 1
    return d


def swap_unique_keys_values(d):
    keys = []
    values = []
    dict_keys = []
    dict_values = []
    dump = []
    for k, v in list(d.items()):
        keys.append(k)
        values.append(v)
    for num in values:
        test = num
        values = values[1:]
        if test in values:
            dump.append(test)
        elif test not in values and test not in dump:
            dict_keys.append(test)
            dict_values.append(keys[0])
        keys = keys[1:]
    d = {}
    i = 0
    while i < len(dict_keys):
        d[dict_keys[i]] = dict_values[i]
        i = i + 1
    return d


def swap_unique_keys_values(d):
    keys = []
    values = []
    dict_keys = []
    dict_values = []
    dump = []
    for k, v in list(d.items()):
        keys.append(k)
        values.append(v)
    for num in values:
        test = num
        values = values[1:]
        if test in values:
            dump.append(test)
        elif test not in values and test not in dump:
            dict_keys.append(test)
            dict_values.append(keys[0])
        keys = keys[1:]
    i = 0
    while i < len(dict_keys):
        d[dict_keys[i]] = dict_values[i]
        i = i + 1
    return d


def swap_unique_keys_values(d):
    keys = []
    values = []
    dict_keys = []
    dict_values = []
    dump = []
    for k, v in list(d.items()):
        keys.append(k)
        values.append(v)
    for num in values:
        test = num
        values = values[1:]
        if test in values:
            dump.append(test)
        elif test not in values and test not in dump:
            dict_keys.append(test)
            dict_values.append(keys[0])
        keys = keys[1:]
    d = {}
    for i in range(0, len(dict_keys)):
        d[dict_keys[i]] = dict_values[i]
    return d


def swap_unique_keys_values(d):
    new_d = {}
    t = []
    for k, v in list(d.items()):
        if v not in new_d:
            new_d[v] = k
        else:
            t.append(v)
    for v in t:
        del new_d[v]
    return new_d


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())
        .count(v) == 1])


def swap_unique_keys_values(d):
    new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.
        values()).count(v) == 1])))


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if v not in list(d.keys())}


def swap_keys_values(d):
    return {value: key for key, value in list(d.items())}


def swap_unique_keys_values(d):
    new_dict = {value: key for key, value in list(d.items()) if value not in
        new_dict}


def swap_unique_keys_values(d):
    new_dict = {value: key for key, value in list(d.items()) if value not in
        new_dict}
    return new_dict


def swap_unique_keys_values(d):
    new_dict = {}
    for key, value in list(d.items()):
        if value not in new_dict:
            new_dict[value] = key
    return new_dict


def swap_unique_keys_values(d):
    new_dict = {}
    for key, value in list(d.items()):
        if value not in new_dict:
            new_dict[value] = key
        else:
            del new_dict[value]
    return new_dict


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_keys_values(my_dict):
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = set(d.itmes())
    for w in items:
        if items.count(w) > 1:
            d.pop(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = set(d.items())
    for w in items:
        if items.count(w) > 1:
            d.pop(d[w])
    d = {v: k for k, v in list(d.items())}
    return d


def swap_keys_values(d):
    new_d = dict(list(zip(list(d.values()), list(d.keys()))))
    return new_d


def swap_unique_keys_values(d):
    items = set(d.items())
    for w in items:
        if items.count(w) > 1:
            d.pop(d[w])
    print(items)
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = set(d.items())
    print(items)
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    items = set(d.items())
    print(items)


def swap_unique_keys_values(a):
    new_dict = {v: k for k, v in list(a.items())}
    l = []
    for i in a:
        l.append(a[i])
    for i in l:
        if l.count(i) > 1:
            del new_dict[i]
            break
    return new_dict
    return new_dict


def swap_keys_values(d):
    new_dict = dict([(v, k) for k, v in list(d.items())])
    return new_dict


def swap_unique_keys_values(d):
    new_dict = {}
    for k in d:
        v = d[k]
        if v not in new_dict:
            new_dict[v] = k
        else:
            del new_dict[v]
    return new_dict


def swap_keys_values(d):
    new_d = {}
    for k in d:
        new_d[d[k]] = k
    return new_d


def swap_unique_keys_values(d):
    new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())
        .count(v) == 1])
    return new_dict


def swap_unique_keys_values(d):
    new_d = {}
    for k in d:
        if d[k] not in new_d:
            new_d[d[k]] = k
    return new_d


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    new_dict = {v: k for k, v in list(d.items())}
    print(sorted(new_dict.items()))


def swap_keys_values(d):
    d1 = {}
    for k, v in list(d.items()):
        d1[v] = k
    return d1


def swap_unique_keys_values(d):
    new_d = {}
    values = list(d.values())
    keys = list(d.keys())
    i = 0
    for i in range(0, len(values)):
        if values.count(values[i]) < 2:
            new_d[values[i]] = keys[i]
    return new_d


def swap_unique_keys_values(d):
    d1 = {}
    num = []
    let = []
    for k, v in list(d.items()):
        if v not in num and k not in let:
            d1[v] = k
            num.append(v)
            let.append(k)
    return d1


def swap_unique_keys_values(d):
    d1 = {}
    num = []
    let = []
    print(d)
    for k, v in list(d.items()):
        if v not in num and k not in let:
            d1[v] = k
            num.append(v)
            let.append(k)
    return d1


def swap_unique_keys_values(d):
    store = {}
    di = d
    for key in d:
        for k in di:
            if key == k:
                break
            if di[k] == d[key]:
                continue
            else:
                store[key] = d[k]
    return {v: k for v, k in list(store.items())}


def swap_keys_values(d):
    {v: k for k, v in list(d.items())}


def swap_keys_values():
    return {v: k for k, v in d.items}


def swap_keys_values():
    return {v: k for k, v in list(d.items())}


def swap_unique_keys_values(d):
    l = []
    m = []
    for v in list(d.items()):
        if v in l:
            m.append(v)
        else:
            l.append(v)
    return {v: k for k, v in list(d.items()) if v not in m}


def swap_unique_keys_values(d):
    l = []
    m = []
    for v in list(d.values()):
        if v in l:
            m.append(v)
        else:
            l.append(v)
    return {v: k for k, v in list(d.items()) if v not in m}


def swap_keys_values(my_dict):
    d = {v: k for k, v in list(d.items())}
    return d


def swap_keys_values(my_dict):
    d = {v: k for k, v in list(d.items())}


def swap_keys_values(my_dict):
    my_dict = {v: k for k, v in list(d.items())}


def swap_keys_values(my_dict):
    my_dict = {v: k for k, v in list(my_dict.items())}


def swap_unique_keys_values(d):
    new_dict = print(sorted(dict([(v, k) for k, v in d.items() if list(d.
        values()).count(v) == 1])))


def swap_keys_values(d):
    swapped_d = {}
    for key in d:
        swapped_d[d[key]] = key
    print(swapped_d)


def swap_keys_values(d):
    m = {}
    for i in list(d.items()):
        m[i[1]] = i[0]
    return m


def swap_unique_keys_values(d):
    m = {}
    for i in list(d.items()):
        if i[1] not in m:
            m[i[1]] = i[0]
    return m


def swap_keys_values(d):
    d = {v: k for k, v in list(d.items())}
    return d


def swap_unique_keys_values(d):
    m = {}
    for i in list(d.items()):
        if i[1].count(d) == 1:
            m[i[1]] = i[0]
    return m


def swap_unique_keys_values(d):
    m = {}
    for i in list(d.items()):
        if list(d.values()).count(i[1]) == 1:
            m[i[1]] = i[0]
    return m


def swap_unique_keys_values(d):
    m = {}
    for i in list(d.items()):
        if d.count(i[1]) == 1:
            m[i[1]] = i[0]
    return m


def swap_keys_values(d):
    swapped_d = {}
    for key in d:
        swapped_d[d[key]] = key
    print(list(swapped_d.items()))


def swap_keys_values(d):
    swapped_d = {}
    for key in d:
        swapped_d[d[key]] = key
    return swapped_d


def swap_keys_values(d):
    {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    return {v: k for k, v in list(d.items())}


def swap_keys_values(x):
    for a in d:
        e[d[value]] = e[d[key]]


def swap_keys_values(x):
    for a in d:
        e[d[value]] = e[d[key]]
    return e


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.avlues()).count(v) == 1}


def swap_unique_keys_values(d):
    return {v: k for k, v in list(d.items()) if list(d.values()).count(v) == 1}


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([v])
            del out_dict[v]
        elif v not in blacklist:
            out_dict[v] = k


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([v])
            del out_dict[v]
        elif v not in blacklist:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([v])
            del out_dict[v]
        elif t not in blacklist:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([v])
            del out_dict[v]
        elif t not in blist:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([t])
            del out_dict[t]
        elif t not in blist:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    blist = set()
    for k, t in list(in_dict.items()):
        if t in out_dict:
            blist.update([t])
            del out_dict[t]
        elif t not in blist:
            out_dict[t] = k
    return out_dict


def swap_unique_keys_values(dick):
    newdick = {}
    for k, v in list(dick.items()):
        if v not in newdick:
            newdick[v] = k
    return newdick


def swap_unique_keys_values(dick):
    newdick = {}
    for k, v in list(dick.items()):
        if list(dick.values()).count(v) == 1:
            newdick[v] = k
    return newdick


def swap_unique_keys_values(dick):
    newdick = {}
    for k, v in list(dick.items()):
        if [v for v in list(dick.values())].count(v) == 1:
            newdick[v] = k
    return newdick


def swap_keys_values():
    return {v: k for k, v in list(d.items())}


def swap_keys_values(d):
    d = {'cat': 2, 'dog': 7, 'horse': 9, 'whale': 14}
    for key, value in d:
        {value: key for key, value in list(d.items())}
    print(swap_keys_values(d))


def swap_keys_values(d):
    reverse = {}
    for k, v in list(d.items()):
        reverse[v] = k
    return reverse


def swap_unique_keys_values(d):
    a = [v for k, v in list(d.items())]
    b = [c for c in a if a.count(c) == 1]
    return {v: k for k, v in list(d.items()) if v in b}


def swap_unique_keys_values(d):
    a, b = [v for k, v in list(d.items())], [c for c in a if a.count(c) == 1]
    return {v: k for k, v in list(d.items()) if v in b}


def swap_unique_keys_values(d):
    m = {}
    for i in list(d.items()):
        if list(d.values()).count(i[1]) == 1:
            m[i[1]] = i[0]
    return m


def swap_keys_values(in_dict):
    out_dict = {}
    for k, v in list(in_dict.items()):
        out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    list = set()
    for k, v in in_dict.items:
        if v in out_dict():
            list.append([v])
            del out_dict[v]
        elif v not in list:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(in_dict):
    out_dict = {}
    list = set()
    for k, v in in_dict.items:
        if v in out_dict():
            list.update([v])
            del out_dict[v]
        elif v not in list:
            out_dict[v] = k
    return out_dict


def swap_unique_keys_values(d):
    new_dict = dict([(v, k) for k, v in list(d.items()) if list(d.values())
        .count(v) == 1])
    print(new_dict)


def swap_unique_keys_values(d):
    return dict([(v, k) for k, v in list(d.items()) if list(d.values()).
        count(v) == 1])


def swap_keys_values(d):
    {v: k for k, v in list(d.items())}
    return d


def swap_keys_values(d):
    new_dict = {v: k for k, v in list(d.items())}
    return new_dict


def swap_keys_values(d):
    return dict([(v, k) for k, v in list(d.items())])