import math

def plot(x,y):
    print(f'{x:.8f} {y:.8f}')
    
def Koch(n, x1,y1,x2,y2):
    if n == 0: 
        plot(x1,y1)        
        return
    sx = (2 * x1 + x2) / 3
    sy = (2 * y1 + y2) / 3
    tx = (x1 + 2 * x2) / 3
    ty = (y1 + 2 * y2) / 3
    ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1, x1, y1, sx, sy)
    Koch(n-1, sx, sy, ux, uy)
    Koch(n-1, ux, uy, tx, ty)
    Koch(n-1, tx, ty, x2, y2)

n = int(input())
Koch(n, 0, 0, 100, 0)
plot(100,0) import math math def plot(x,y):
    print(f'{x:.8f} {y:.8f}')
     plot print(f'{x:.8f} {y:.8f}') print f'{x:.8f} {y:.8f}' x x y y def Koch(n, x1,y1,x2,y2):
    if n == 0: 
        plot(x1,y1)        
        return
    sx = (2 * x1 + x2) / 3
    sy = (2 * y1 + y2) / 3
    tx = (x1 + 2 * x2) / 3
    ty = (y1 + 2 * y2) / 3
    ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1, x1, y1, sx, sy)
    Koch(n-1, sx, sy, ux, uy)
    Koch(n-1, ux, uy, tx, ty)
    Koch(n-1, tx, ty, x2, y2) Koch if n == 0: 
        plot(x1,y1)        
        return
     n == 0 n 0 plot(x1,y1) plot x1 y1 return 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 = (x1 + 2 * x2) / 3 tx (x1 + 2 * x2) / 3 x1 + 2 * x2 x1 2 * x2 2 x2 3 ty = (y1 + 2 * y2) / 3 ty (y1 + 2 * y2) / 3 y1 + 2 * y2 y1 2 * y2 2 y2 3 ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx ux (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2) (tx-sx)*(1/2) tx-sx tx sx 1/2 1 2 (ty-sy)*(math.sqrt(3)/2) ty-sy ty sy math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 sx uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy uy (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2) (tx-sx)*(math.sqrt(3)/2) tx-sx tx sx math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 (ty-sy)*(1/2) ty-sy ty sy 1/2 1 2 sy Koch(n-1, x1, y1, sx, sy) Koch n-1 n 1 x1 y1 sx sy Koch(n-1, sx, sy, ux, uy) Koch n-1 n 1 sx sy ux uy Koch(n-1, ux, uy, tx, ty) Koch n-1 n 1 ux uy 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 = int(input()) n int(input()) int input() input Koch(n, 0, 0, 100, 0) Koch n 0 0 100 0 plot(100,0) plot 100 0 def Koch(n, x1,y1,x2,y2):
    if n == 0: 
        plot(x1,y1)        
        return
    sx = (2 * x1 + x2) / 3
    sy = (2 * y1 + y2) / 3
    tx = (x1 + 2 * x2) / 3
    ty = (y1 + 2 * y2) / 3
    ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1, x1, y1, sx, sy)
    Koch(n-1, sx, sy, ux, uy)
    Koch(n-1, ux, uy, tx, ty)
    Koch(n-1, tx, ty, x2, y2) def Koch(n, x1,y1,x2,y2):
    if n == 0: 
        plot(x1,y1)        
        return
    sx = (2 * x1 + x2) / 3
    sy = (2 * y1 + y2) / 3
    tx = (x1 + 2 * x2) / 3
    ty = (y1 + 2 * y2) / 3
    ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1, x1, y1, sx, sy)
    Koch(n-1, sx, sy, ux, uy)
    Koch(n-1, ux, uy, tx, ty)
    Koch(n-1, tx, ty, x2, y2) Koch def plot(x,y):
    print(f'{x:.8f} {y:.8f}')
     def plot(x,y):
    print(f'{x:.8f} {y:.8f}')
     plot n = int(input()) int(input()) n
import math

def plot(x,y):
    print(f'{x:.8f} {y:.8f}')
    
def Koch(n, x1,y1,x2,y2):
    if n == 0: 
        plot(x1,y1)        
        return
    sx = (2 * x1 + x2) / 3
    sy = (2 * y1 + y2) / 3
    tx = (x1 + 2 * x2) / 3
    ty = (y1 + 2 * y2) / 3
    ux = (tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy = (tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1, x1, y1, sx, sy)
    Koch(n-1, sx, sy, ux, uy)
    Koch(n-1, ux, uy, tx, ty)
    Koch(n-1, tx, ty, x2, y2)

n = int(input())
Koch(n, 0, 0, 100, 0)
plot(100,0)
