import math
          
def koch(n, h, i, j, k):
 if n == 0:
  return
           
 sx = (h*2+j)/3
 sy = (i*2+k)/3
 tx = (h+j*2)/3
 ty = (i+k*2)/3
 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx
 uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy
          
 koch(n-1, h, i, sx, sy)
 print sx, sy
 koch(n-1, sx, sy, ux, uy)
 print ux, uy
 koch(n-1, ux, uy, tx, ty)
 print tx, ty
 koch(n-1, tx, ty, j, k)
   
n = input()
          
px = float(0)
py = float(0)
qx = float(100)
qy = float(0)
          
print px, py
koch(n, px, py, qx, qy)
print qx, qy import math math def koch(n, h, i, j, k):
 if n == 0:
  return
           
 sx = (h*2+j)/3
 sy = (i*2+k)/3
 tx = (h+j*2)/3
 ty = (i+k*2)/3
 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx
 uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy
          
 koch(n-1, h, i, sx, sy)
 print sx, sy
 koch(n-1, sx, sy, ux, uy)
 print ux, uy
 koch(n-1, ux, uy, tx, ty)
 print tx, ty
 koch(n-1, tx, ty, j, k)
    koch if n == 0:
  return
           
  n == 0 n 0 return sx = (h*2+j)/3 sx (h*2+j)/3 h*2+j h*2 h 2 j 3 sy = (i*2+k)/3 sy (i*2+k)/3 i*2+k i*2 i 2 k 3 tx = (h+j*2)/3 tx (h+j*2)/3 h+j*2 h j*2 j 2 3 ty = (i+k*2)/3 ty (i+k*2)/3 i+k*2 i k*2 k 2 3 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx ux (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) (tx-sx)*math.cos(math.pi/3) tx-sx tx sx math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 (ty-sy)*math.sin(math.pi/3) ty-sy ty sy math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 sx uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy uy (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) (tx-sx)*math.sin(math.pi/3) tx-sx tx sx math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 (ty-sy)*math.cos(math.pi/3) ty-sy ty sy math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 sy koch(n-1, h, i, sx, sy) koch n-1 n 1 h i sx sy print sx sy koch(n-1, sx, sy, ux, uy) koch n-1 n 1 sx sy ux uy print ux uy koch(n-1, ux, uy, tx, ty) koch n-1 n 1 ux uy tx ty print tx ty koch(n-1, tx, ty, j, k) koch n-1 n 1 tx ty j k n n h h i i j j k k n = input() n input() input px = float(0) px float(0) float 0 py = float(0) py float(0) float 0 qx = float(100) qx float(100) float 100 qy = float(0) qy float(0) float 0 print px py koch(n, px, py, qx, qy) koch n px py qx qy print qx qy def koch(n, h, i, j, k):
 if n == 0:
  return
           
 sx = (h*2+j)/3
 sy = (i*2+k)/3
 tx = (h+j*2)/3
 ty = (i+k*2)/3
 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx
 uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy
          
 koch(n-1, h, i, sx, sy)
 print sx, sy
 koch(n-1, sx, sy, ux, uy)
 print ux, uy
 koch(n-1, ux, uy, tx, ty)
 print tx, ty
 koch(n-1, tx, ty, j, k)
    def koch(n, h, i, j, k):
 if n == 0:
  return
           
 sx = (h*2+j)/3
 sy = (i*2+k)/3
 tx = (h+j*2)/3
 ty = (i+k*2)/3
 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx
 uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy
          
 koch(n-1, h, i, sx, sy)
 print sx, sy
 koch(n-1, sx, sy, ux, uy)
 print ux, uy
 koch(n-1, ux, uy, tx, ty)
 print tx, ty
 koch(n-1, tx, ty, j, k)
    koch px = float(0) float(0) px py = float(0) float(0) py n = input() input() n qx = float(100) float(100) qx qy = float(0) float(0) qy
import math
          
def koch(n, h, i, j, k):
 if n == 0:
  return
           
 sx = (h*2+j)/3
 sy = (i*2+k)/3
 tx = (h+j*2)/3
 ty = (i+k*2)/3
 ux = (tx-sx)*math.cos(math.pi/3) - (ty-sy)*math.sin(math.pi/3) + sx
 uy = (tx-sx)*math.sin(math.pi/3) + (ty-sy)*math.cos(math.pi/3) + sy
          
 koch(n-1, h, i, sx, sy)
 print sx, sy
 koch(n-1, sx, sy, ux, uy)
 print ux, uy
 koch(n-1, ux, uy, tx, ty)
 print tx, ty
 koch(n-1, tx, ty, j, k)
   
n = input()
          
px = float(0)
py = float(0)
qx = float(100)
qy = float(0)
          
print px, py
koch(n, px, py, qx, qy)
print qx, qy