three level nested loop, 4