import math

n = int(input())

def koch(c, px, py, qx, qy):
  if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy)

print("0 0")
koch(n, 0, 0, 100, 0)
print("100 0") import math math n = int(input()) n int(input()) int input() input def koch(c, px, py, qx, qy):
  if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy) koch if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy) c > 0 c 0 sx = (2*px+qx)/3 sx (2*px+qx)/3 2*px+qx 2*px 2 px qx 3 sy = (2*py+qy)/3 sy (2*py+qy)/3 2*py+qy 2*py 2 py qy 3 tx = (px+2*qx)/3 tx (px+2*qx)/3 px+2*qx px 2*qx 2 qx 3 ty = (py+2*qy)/3 ty (py+2*qy)/3 py+2*qy py 2*qy 2 qy 3 ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx ux (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60)) (tx-sx)*math.cos(math.radians(60)) tx-sx tx sx math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 (ty-sy)*math.sin(math.radians(60)) ty-sy ty sy math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 sx uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy uy (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60)) (tx-sx)*math.sin(math.radians(60)) tx-sx tx sx math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 (ty-sy)*math.cos(math.radians(60)) ty-sy ty sy math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 sy koch(c-1, px, py, sx, sy) koch c-1 c 1 px py sx sy S = [sx, sy] S [sx, sy] sx sy print(" ".join(map(str, S))) print " ".join(map(str, S)) " ".join " " join map(str, S) map str S koch(c-1, sx, sy, ux, uy) koch c-1 c 1 sx sy ux uy U = [ux, uy] U [ux, uy] ux uy print(" ".join(map(str, U))) print " ".join(map(str, U)) " ".join " " join map(str, U) map str U koch(c-1, ux, uy, tx, ty) koch c-1 c 1 ux uy tx ty T = [tx, ty] T [tx, ty] tx ty print(" ".join(map(str, T))) print " ".join(map(str, T)) " ".join " " join map(str, T) map str T koch(c-1, tx, ty, qx, qy) koch c-1 c 1 tx ty qx qy c c px px py py qx qx qy qy print("0 0") print "0 0" koch(n, 0, 0, 100, 0) koch n 0 0 100 0 print("100 0") print "100 0" n = int(input()) int(input()) n def koch(c, px, py, qx, qy):
  if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy) def koch(c, px, py, qx, qy):
  if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy) koch
import math

n = int(input())

def koch(c, px, py, qx, qy):
  if c > 0:
    sx = (2*px+qx)/3
    sy = (2*py+qy)/3
    tx = (px+2*qx)/3
    ty = (py+2*qy)/3
    ux = (tx-sx)*math.cos(math.radians(60))-(ty-sy)*math.sin(math.radians(60))+sx
    uy = (tx-sx)*math.sin(math.radians(60))+(ty-sy)*math.cos(math.radians(60))+sy
    koch(c-1, px, py, sx, sy)
    S = [sx, sy]
    print(" ".join(map(str, S)))
    koch(c-1, sx, sy, ux, uy)
    U = [ux, uy]
    print(" ".join(map(str, U)))    
    koch(c-1, ux, uy, tx, ty)
    T = [tx, ty]
    print(" ".join(map(str, T)))
    koch(c-1, tx, ty, qx, qy)

print("0 0")
koch(n, 0, 0, 100, 0)
print("100 0")
