I solved it! I put in the foreach a new foreach with new question:
$posts = get_field (‘relationship1’);
foreach ($posts as $post) :
$subposts = get_field(‘relationship2’, $post->ID);
foreach ($subposts as $subpost) :
echo get_the_title($subpost->ID);
endforeach; endforeach;