def matix_contains(m, elem):
    """Look for value in matrix"""
    for row, i in enumerate(m):
        try:
            col = i.index(elem)
        except ValueError:
            continue
        return row, col
    return -1, -1