from math import sqrt
q3 = sqrt(3)
fmt = "%.8f %.8f"
def koch(x0, y0, x1, y1, c):
    if c == n:
        return (fmt % (x0, y0),)
    xp = (x0*2 + x1) / 3
    yp = (y0*2 + y1) / 3

    xq = (x0 + x1*2) / 3
    yq = (y0 + y1*2) / 3

    dx = (x1 - x0) / 6
    dy = (y1 - y0) / 6

    xr = xp + (dx - dy * q3)
    yr = yp + (dx * q3 + dy)

    return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1)
n = int(input())
print(*koch(0, 0, 100, 0, 0)+(fmt % (100, 0),), sep='\n') from math import sqrt q3 = sqrt(3) q3 sqrt(3) sqrt 3 fmt = "%.8f %.8f" fmt "%.8f %.8f" def koch(x0, y0, x1, y1, c):
    if c == n:
        return (fmt % (x0, y0),)
    xp = (x0*2 + x1) / 3
    yp = (y0*2 + y1) / 3

    xq = (x0 + x1*2) / 3
    yq = (y0 + y1*2) / 3

    dx = (x1 - x0) / 6
    dy = (y1 - y0) / 6

    xr = xp + (dx - dy * q3)
    yr = yp + (dx * q3 + dy)

    return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1) koch if c == n:
        return (fmt % (x0, y0),)
     c == n c n return (fmt % (x0, y0),) fmt % (x0, y0) fmt (x0, y0) x0 y0 xp = (x0*2 + x1) / 3 xp (x0*2 + x1) / 3 x0*2 + x1 x0*2 x0 2 x1 3 yp = (y0*2 + y1) / 3 yp (y0*2 + y1) / 3 y0*2 + y1 y0*2 y0 2 y1 3 xq = (x0 + x1*2) / 3 xq (x0 + x1*2) / 3 x0 + x1*2 x0 x1*2 x1 2 3 yq = (y0 + y1*2) / 3 yq (y0 + y1*2) / 3 y0 + y1*2 y0 y1*2 y1 2 3 dx = (x1 - x0) / 6 dx (x1 - x0) / 6 x1 - x0 x1 x0 6 dy = (y1 - y0) / 6 dy (y1 - y0) / 6 y1 - y0 y1 y0 6 xr = xp + (dx - dy * q3) xr xp + (dx - dy * q3) xp dx - dy * q3 dx dy * q3 dy q3 yr = yp + (dx * q3 + dy) yr yp + (dx * q3 + dy) yp dx * q3 + dy dx * q3 dx q3 dy return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1) koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1) koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) koch(x0, y0, xp, yp, c+1) koch x0 y0 xp yp c+1 c 1 koch(xp, yp, xr, yr, c+1) koch xp yp xr yr c+1 c 1 koch(xr, yr, xq, yq, c+1) koch xr yr xq yq c+1 c 1 koch(xq, yq, x1, y1, c+1) koch xq yq x1 y1 c+1 c 1 x0 x0 y0 y0 x1 x1 y1 y1 c c n = int(input()) n int(input()) int input() input print(*koch(0, 0, 100, 0, 0)+(fmt % (100, 0),), sep='\n') print *koch(0, 0, 100, 0, 0)+(fmt % (100, 0),) koch(0, 0, 100, 0, 0)+(fmt % (100, 0),) koch(0, 0, 100, 0, 0) koch 0 0 100 0 0 fmt % (100, 0) fmt (100, 0) 100 0 sep='\n' sep '\n' n = int(input()) int(input()) n def koch(x0, y0, x1, y1, c):
    if c == n:
        return (fmt % (x0, y0),)
    xp = (x0*2 + x1) / 3
    yp = (y0*2 + y1) / 3

    xq = (x0 + x1*2) / 3
    yq = (y0 + y1*2) / 3

    dx = (x1 - x0) / 6
    dy = (y1 - y0) / 6

    xr = xp + (dx - dy * q3)
    yr = yp + (dx * q3 + dy)

    return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1) def koch(x0, y0, x1, y1, c):
    if c == n:
        return (fmt % (x0, y0),)
    xp = (x0*2 + x1) / 3
    yp = (y0*2 + y1) / 3

    xq = (x0 + x1*2) / 3
    yq = (y0 + y1*2) / 3

    dx = (x1 - x0) / 6
    dy = (y1 - y0) / 6

    xr = xp + (dx - dy * q3)
    yr = yp + (dx * q3 + dy)

    return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1) koch q3 = sqrt(3) sqrt(3) q3 fmt = "%.8f %.8f" "%.8f %.8f" fmt
from math import sqrt
q3 = sqrt(3)
fmt = "%.8f %.8f"
def koch(x0, y0, x1, y1, c):
    if c == n:
        return (fmt % (x0, y0),)
    xp = (x0*2 + x1) / 3
    yp = (y0*2 + y1) / 3

    xq = (x0 + x1*2) / 3
    yq = (y0 + y1*2) / 3

    dx = (x1 - x0) / 6
    dy = (y1 - y0) / 6

    xr = xp + (dx - dy * q3)
    yr = yp + (dx * q3 + dy)

    return koch(x0, y0, xp, yp, c+1) + koch(xp, yp, xr, yr, c+1) + koch(xr, yr, xq, yq, c+1) + koch(xq, yq, x1, y1, c+1)
n = int(input())
print(*koch(0, 0, 100, 0, 0)+(fmt % (100, 0),), sep='\n')