import mcpi.minecraft as minecraft

mc = minecraft.Minecraft.create()

NORTH = 2
SOUTH = 0

def fill(start_x, start_y, start_z, block=49, size=5, facing=NORTH):
    for x in range(0, size):
        for y in range(0, 5):
            mc.setBlock(start_x + (facing-1) * x, start_y + y, start_z, block)


def a(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)
        mc.setBlock(x + (facing-1) * 4, y + height, z, fg_block)

    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)


def b(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)


    # horizontal lines
    for width in range(0, 4):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)

    # right side dots
    mc.setBlock(x + (facing-1) * 4, y + 1, z, fg_block)
    mc.setBlock(x + (facing-1) * 4, y + 3, z, fg_block)


def c(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)


    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)


def d(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)
        if (height < 4) and (height > 0):
            mc.setBlock(x + (facing-1) * 4, y + height, z, fg_block)

    # horizontal lines
    for width in range(0, 4):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)


def e(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)


    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)


def f(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)


    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        if (width < 4):
            mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)


def g(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)
        if height < 3:
            mc.setBlock(x + (facing-1) * 4, y + height, z, fg_block)



    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)
        if (width > 1):
            mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)
        if (width < 4):
            mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)


def h(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x, y + height, z, fg_block)
        mc.setBlock(x + (facing-1) * 4, y + height, z, fg_block)

    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 2, z, fg_block)


def i(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)
    # vertical lines
    for height in range(0, 5):
        mc.setBlock(x + (facing-1) * 2, y + height, z, fg_block)


    # horizontal lines
    for width in range(0, 5):
        mc.setBlock(x + (facing-1) * width, y + 4, z, fg_block)
        mc.setBlock(x + (facing-1) * width, y + 0, z, fg_block)


def j(x, y, z, fg_block=57, bg_block=49, facing=NORTH):
    fill(x, y, z, bg_block, facing=facing)