Retrieve the common prefix across multiple strings