def positionlines(numbers, digits, gapposchar='.'):
    """For a given iterable `numbers` of integers and a given number of `digits`,
    return a list of `digits` strings (lines) that,
    if printed in reverse order below each other,
    constitute the vertically written `numbers` (mod 10**digits).
    """
    lines = [[] for _ in range(digits)]
    if digits <= 0:
        return lines
    for i in numbers:
        if i < 0:
            for l in lines:
                l.append(gapposchar)
        elif i == 0:
            lines[0].append('0')
            for k in range(1, digits):
                lines[k].append(' ')
        else:
            for k in range(digits):
                c = str(i % 10) if i != 0 else ' '
                lines[k].append(c)
                i = i // 10
    for k in range(digits):
        lines[k] = ''.join(lines[k])
    return lines
