def remMin(a: list):
    x = 0
    y = a[0]

    for i in range(len(a)):
        if y > a[i]:
            y = a[i]
            x = i
    
    a.pop(x)


def remMax(a: list):
    x = 0
    y = a[0]

    for i in range(len(a)):
        if y < a[i]:
            y = a[i]
            x = i
    
    a.pop(x)


def remOdd(a: list):
    for i in range(len(a)-1, -1, -1):
        if a[i] % 2 == 1:
            a.pop(i)


def remLenNotTwo(a: list):
    for i in range(len(a)-1, -1, -1):
        if 10 > a[i] or a[i] > 99:
            a.pop(i)


def printlistf(a):
    print(":".join(list(map(lambda n: str(n), a))))


def main():
    nums = list(map(lambda n: int(n), input("Inserisci la lista di numeri: ").split(":")))

    a1 = nums.copy()
    remMax(a1)
    remMin(a1)
    printlistf(a1)

    a2 = nums.copy()
    remOdd(a2)
    printlistf(a2)

    a3 = nums.copy()
    remLenNotTwo(a3)
    printlistf(a3)


main()