def parse_triangles(lines):
    """Parse triangles from three numbers in the same column."""
    triangles = []
    for index, _ in enumerate(lines[::3]):
        row_index = 3 * index
        cur_triangles = [[] for _ in range(3)]
        for row in range(3):
            for column in range(3):
                cur_triangles[column].append(lines[row_index + row][column])
        triangles.extend(cur_triangles)
    return triangles