from typing import List def longest_chain(submatrix: List[int]) -> int: """ Given a list of integers, return the length of the longest cha