def stringify(grid: dict, n: int) -> str:
    'Stringify with (0, 0) in the lower-left corner.'
    rows = []
    for y in reversed(range(n)):
        row = []
        for x in range(n):
            value = grid.get((x, y), '-')
            row.append(value)
        rows.append(row)
    return '\n'.join((''.join(row) for row in rows))
Stringify with (0, 0) in the lower-left corner.
def stringify(grid: dict, n: int) -> str:
    
    rows = []
    for y in reversed(range(n)):
        row = []
        for x in range(n):
            value = grid.get((x, y), '-')
            row.append(value)
        rows.append(row)
    return '\n'.join((.join(row) for row in rows))