def merge(input, second = []):
    """
    Merges 2 lists together, assuming both lists are already sorted.
    """
    i = 0
    j = 0
    n = len(input) + len(second)
    out = []
    for _ in range(0, n):
        try:
            inp = input[i]
        except IndexError:
            out += second[j:]
            break

        try:
            sec = second[j]
        except IndexError:
            out += input[i:]
            break

        if inp < sec:
            out.append(input[i])
            i += 1
            continue
        out.append(second[j])
        j += 1
    return out