5051525354555657585960
} for (int j = y - 1; j >= 0; j--) { for (int x = 0; x < width; x++) { if (newSegments.contains(new Segment(x, j))) { results = results.replace(new Segment(x, j), new Segment(x, j + 1)); } } } return results;