import click

from myhelpers.dummy import longest_common_prefix
from myhelpers.primitives.logging import setup_logging


@click.command()
@click.argument('fst', metavar='STRING')
@click.argument('snd', metavar='STRING')
def program(fst, snd):
    """
    Computes the longest common prefix of both STRING's.
    """
    result = longest_common_prefix(fst, snd)
    print(result)


setup_logging()
program()
