

def multiply(s1, s2):
    zero_ord = ord('0')
    result = [0] * (len(s1) + len(s2))
    i = len(s1) - 1
    while i >= 0:
        j = len(s2) - 1
        while j >= 0:
            p1, p2 = i + j, i + j + 1
            mul = (ord(s1[i]) - zero_ord) * (ord(s2[j]) - zero_ord) + result[p2]
            result[p1] += mul / 10
            result[p2] = mul % 10
            j -= 1
        i -= 1

    start = 0
    while start < len(result) and result[start] == 0:
        start += 1
    return ''.join(str(x) for x in result[start:])


if __name__ == '__main__':
    print multiply('123', '456')
