def find_pattern(lines, pattern):
    """Return a match group if the pattern is found otherwise return None."""
    for line in lines:
        match = pattern.search(line)
        if match:
            return match.group