import math
           
def koch(n, x1, y1, x2, y2):
  if n == 0:
    return
  
  theta60 = math.radians(60)
          
  sx = ( 2 * x1 + x2 ) /3
  sy = ( 2 * y1 + y2 ) /3
  tx = ( 2 * x2 + x1 ) /3
  ty = ( 2 * y2 + y1 ) /3
  ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx
  uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy
           
  koch(n-1, x1, y1, 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, x2, y2)
    
n = input()
           
p1x = float(0.)
p1y = float(0.)
p2x = float(100.)
p2y = float(0.)
           
print p1x, p1y
koch(n, p1x, p1y, p2x, p2y)
print p2x, p2y import math math def koch(n, x1, y1, x2, y2):
  if n == 0:
    return
  
  theta60 = math.radians(60)
          
  sx = ( 2 * x1 + x2 ) /3
  sy = ( 2 * y1 + y2 ) /3
  tx = ( 2 * x2 + x1 ) /3
  ty = ( 2 * y2 + y1 ) /3
  ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx
  uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy
           
  koch(n-1, x1, y1, 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, x2, y2)
     koch if n == 0:
    return
  
   n == 0 n 0 return theta60 = math.radians(60) theta60 math.radians(60) math.radians math radians 60 sx = ( 2 * x1 + x2 ) /3 sx ( 2 * x1 + x2 ) /3 2 * x1 + x2 2 * x1 2 x1 x2 3 sy = ( 2 * y1 + y2 ) /3 sy ( 2 * y1 + y2 ) /3 2 * y1 + y2 2 * y1 2 y1 y2 3 tx = ( 2 * x2 + x1 ) /3 tx ( 2 * x2 + x1 ) /3 2 * x2 + x1 2 * x2 2 x2 x1 3 ty = ( 2 * y2 + y1 ) /3 ty ( 2 * y2 + y1 ) /3 2 * y2 + y1 2 * y2 2 y2 y1 3 ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx ux ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) ( tx - sx ) * math.cos( theta60 ) tx - sx tx sx math.cos( theta60 ) math.cos math cos theta60 ( ty - sy ) * math.sin( theta60 ) ty - sy ty sy math.sin( theta60 ) math.sin math sin theta60 sx uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy uy ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) ( tx - sx ) * math.sin( theta60 ) tx - sx tx sx math.sin( theta60 ) math.sin math sin theta60 ( ty - sy ) * math.cos( theta60 ) ty - sy ty sy math.cos( theta60 ) math.cos math cos theta60 sy koch(n-1, x1, y1, sx, sy) koch n-1 n 1 x1 y1 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, x2, y2) koch n-1 n 1 tx ty x2 y2 n n x1 x1 y1 y1 x2 x2 y2 y2 n = input() n input() input p1x = float(0.) p1x float(0.) float 0. p1y = float(0.) p1y float(0.) float 0. p2x = float(100.) p2x float(100.) float 100. p2y = float(0.) p2y float(0.) float 0. print p1x p1y koch(n, p1x, p1y, p2x, p2y) koch n p1x p1y p2x p2y print p2x p2y p1y = float(0.) float(0.) p1y p1x = float(0.) float(0.) p1x def koch(n, x1, y1, x2, y2):
  if n == 0:
    return
  
  theta60 = math.radians(60)
          
  sx = ( 2 * x1 + x2 ) /3
  sy = ( 2 * y1 + y2 ) /3
  tx = ( 2 * x2 + x1 ) /3
  ty = ( 2 * y2 + y1 ) /3
  ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx
  uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy
           
  koch(n-1, x1, y1, 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, x2, y2)
     def koch(n, x1, y1, x2, y2):
  if n == 0:
    return
  
  theta60 = math.radians(60)
          
  sx = ( 2 * x1 + x2 ) /3
  sy = ( 2 * y1 + y2 ) /3
  tx = ( 2 * x2 + x1 ) /3
  ty = ( 2 * y2 + y1 ) /3
  ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx
  uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy
           
  koch(n-1, x1, y1, 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, x2, y2)
     koch n = input() input() n p2y = float(0.) float(0.) p2y p2x = float(100.) float(100.) p2x
import math
           
def koch(n, x1, y1, x2, y2):
  if n == 0:
    return
  
  theta60 = math.radians(60)
          
  sx = ( 2 * x1 + x2 ) /3
  sy = ( 2 * y1 + y2 ) /3
  tx = ( 2 * x2 + x1 ) /3
  ty = ( 2 * y2 + y1 ) /3
  ux = ( tx - sx ) * math.cos( theta60 ) - ( ty - sy ) * math.sin( theta60 ) + sx
  uy = ( tx - sx ) * math.sin( theta60 ) + ( ty - sy ) * math.cos( theta60 ) + sy
           
  koch(n-1, x1, y1, 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, x2, y2)
    
n = input()
           
p1x = float(0.)
p1y = float(0.)
p2x = float(100.)
p2y = float(0.)
           
print p1x, p1y
koch(n, p1x, p1y, p2x, p2y)
print p2x, p2y