def common_prefix_util(str1, str2):
    prefix = ""
    for c1, c2 in zip(str1, str2):
        if c1 != c2:
            break
        prefix += c1
    return prefix