import math
n = int(input())

def three(p1x, p1y, p2x, p2y):
    dx = (p2x - p1x)
    dy = (p2y - p1y)
    sx = dx / 3 + p1x
    sy = dy / 3 + p1y
    tx = p2x - (dx / 3)
    ty = p2y - (dy / 3)

    mtx = tx - sx
    mty = ty - sy

    rad = math.radians(60)
    mux = mtx * math.cos(rad) - (mty * math.sin(rad))
    muy = mtx * math.sin(rad) + (mty * math.cos(rad))

    ux = mux + sx
    uy = muy + sy

    return [sx, sy, ux, uy, tx, ty]

def koch(p1x, p1y, p2x, p2y, n):
    if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
    if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1)

koch(0.00000000, 0.00000000, 100.00000000, 0.00000000, n)
print('{:.8f} {:.8f}'.format(100.00000000, 0.00000000)) import math math n = int(input()) n int(input()) int input() input def three(p1x, p1y, p2x, p2y):
    dx = (p2x - p1x)
    dy = (p2y - p1y)
    sx = dx / 3 + p1x
    sy = dy / 3 + p1y
    tx = p2x - (dx / 3)
    ty = p2y - (dy / 3)

    mtx = tx - sx
    mty = ty - sy

    rad = math.radians(60)
    mux = mtx * math.cos(rad) - (mty * math.sin(rad))
    muy = mtx * math.sin(rad) + (mty * math.cos(rad))

    ux = mux + sx
    uy = muy + sy

    return [sx, sy, ux, uy, tx, ty] three dx = (p2x - p1x) dx p2x - p1x p2x p1x dy = (p2y - p1y) dy p2y - p1y p2y p1y sx = dx / 3 + p1x sx dx / 3 + p1x dx / 3 dx 3 p1x sy = dy / 3 + p1y sy dy / 3 + p1y dy / 3 dy 3 p1y tx = p2x - (dx / 3) tx p2x - (dx / 3) p2x dx / 3 dx 3 ty = p2y - (dy / 3) ty p2y - (dy / 3) p2y dy / 3 dy 3 mtx = tx - sx mtx tx - sx tx sx mty = ty - sy mty ty - sy ty sy rad = math.radians(60) rad math.radians(60) math.radians math radians 60 mux = mtx * math.cos(rad) - (mty * math.sin(rad)) mux mtx * math.cos(rad) - (mty * math.sin(rad)) mtx * math.cos(rad) mtx math.cos(rad) math.cos math cos rad mty * math.sin(rad) mty math.sin(rad) math.sin math sin rad muy = mtx * math.sin(rad) + (mty * math.cos(rad)) muy mtx * math.sin(rad) + (mty * math.cos(rad)) mtx * math.sin(rad) mtx math.sin(rad) math.sin math sin rad mty * math.cos(rad) mty math.cos(rad) math.cos math cos rad ux = mux + sx ux mux + sx mux sx uy = muy + sy uy muy + sy muy sy return [sx, sy, ux, uy, tx, ty] [sx, sy, ux, uy, tx, ty] sx sy ux uy tx ty p1x p1x p1y p1y p2x p2x p2y p2y def koch(p1x, p1y, p2x, p2y, n):
    if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
    if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1) koch if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
     0 == n 0 n print('{:.8f} {:.8f}'.format(p1x, p1y)) print '{:.8f} {:.8f}'.format(p1x, p1y) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format p1x p1y if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1) 0 < n 0 n sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y) sx three(p1x, p1y, p2x, p2y) three p1x p1y p2x p2y sy ux uy tx ty koch(p1x, p1y, sx, sy, n - 1) koch p1x p1y sx sy n - 1 n 1 koch(sx, sy, ux, uy, n - 1) koch sx sy ux uy n - 1 n 1 koch(ux, uy, tx, ty, n - 1) koch ux uy tx ty n - 1 n 1 koch(tx, ty, p2x, p2y, n - 1) koch tx ty p2x p2y n - 1 n 1 p1x p1x p1y p1y p2x p2x p2y p2y n n koch(0.00000000, 0.00000000, 100.00000000, 0.00000000, n) koch 0.00000000 0.00000000 100.00000000 0.00000000 n print('{:.8f} {:.8f}'.format(100.00000000, 0.00000000)) print '{:.8f} {:.8f}'.format(100.00000000, 0.00000000) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format 100.00000000 0.00000000 def three(p1x, p1y, p2x, p2y):
    dx = (p2x - p1x)
    dy = (p2y - p1y)
    sx = dx / 3 + p1x
    sy = dy / 3 + p1y
    tx = p2x - (dx / 3)
    ty = p2y - (dy / 3)

    mtx = tx - sx
    mty = ty - sy

    rad = math.radians(60)
    mux = mtx * math.cos(rad) - (mty * math.sin(rad))
    muy = mtx * math.sin(rad) + (mty * math.cos(rad))

    ux = mux + sx
    uy = muy + sy

    return [sx, sy, ux, uy, tx, ty] def three(p1x, p1y, p2x, p2y):
    dx = (p2x - p1x)
    dy = (p2y - p1y)
    sx = dx / 3 + p1x
    sy = dy / 3 + p1y
    tx = p2x - (dx / 3)
    ty = p2y - (dy / 3)

    mtx = tx - sx
    mty = ty - sy

    rad = math.radians(60)
    mux = mtx * math.cos(rad) - (mty * math.sin(rad))
    muy = mtx * math.sin(rad) + (mty * math.cos(rad))

    ux = mux + sx
    uy = muy + sy

    return [sx, sy, ux, uy, tx, ty] three n = int(input()) int(input()) n def koch(p1x, p1y, p2x, p2y, n):
    if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
    if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1) def koch(p1x, p1y, p2x, p2y, n):
    if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
    if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1) koch
import math
n = int(input())

def three(p1x, p1y, p2x, p2y):
    dx = (p2x - p1x)
    dy = (p2y - p1y)
    sx = dx / 3 + p1x
    sy = dy / 3 + p1y
    tx = p2x - (dx / 3)
    ty = p2y - (dy / 3)

    mtx = tx - sx
    mty = ty - sy

    rad = math.radians(60)
    mux = mtx * math.cos(rad) - (mty * math.sin(rad))
    muy = mtx * math.sin(rad) + (mty * math.cos(rad))

    ux = mux + sx
    uy = muy + sy

    return [sx, sy, ux, uy, tx, ty]

def koch(p1x, p1y, p2x, p2y, n):
    if 0 == n:
        print('{:.8f} {:.8f}'.format(p1x, p1y))
    if 0 < n:
        sx, sy, ux, uy, tx, ty = three(p1x, p1y, p2x, p2y)
        koch(p1x, p1y, sx, sy, n - 1)
        koch(sx, sy, ux, uy, n - 1)
        koch(ux, uy, tx, ty, n - 1)
        koch(tx, ty, p2x, p2y, n - 1)

koch(0.00000000, 0.00000000, 100.00000000, 0.00000000, n)
print('{:.8f} {:.8f}'.format(100.00000000, 0.00000000))