import math

def rot60(s, t):
    v = t - s
    a = 1/2 + complex(0,(math.sqrt(3)/2))
    return v * a + s

def pr(p):
    x = p.real
    y = p.imag
    print('%.10f %.10f'%(x, y))

def dfs(p1, p2, n):
    if n == 0:
        return
    

    s = (p2 - p1) * (1/3) + p1
    t = (p2 - p1) * (2/3) + p1
    u = rot60(s, t)
    dfs(p1, s, n-1)
    pr(s)
    dfs(s, u, n-1)
    pr(u)
    dfs(u, t, n-1)
    pr(t)
    dfs(t, p2, n-1)
    
n = int(input())
s = (0 + 0j)
t = (100 + 0j)
pr(s)
dfs(s, t, n) 
pr(t)
 import math math def rot60(s, t):
    v = t - s
    a = 1/2 + complex(0,(math.sqrt(3)/2))
    return v * a + s rot60 v = t - s v t - s t s a = 1/2 + complex(0,(math.sqrt(3)/2)) a 1/2 + complex(0,(math.sqrt(3)/2)) 1/2 1 2 complex(0,(math.sqrt(3)/2)) complex 0 math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 return v * a + s v * a + s v * a v a s s s t t def pr(p):
    x = p.real
    y = p.imag
    print('%.10f %.10f'%(x, y)) pr x = p.real x p.real p real y = p.imag y p.imag p imag print('%.10f %.10f'%(x, y)) print '%.10f %.10f'%(x, y) '%.10f %.10f' (x, y) x y p p def dfs(p1, p2, n):
    if n == 0:
        return
    

    s = (p2 - p1) * (1/3) + p1
    t = (p2 - p1) * (2/3) + p1
    u = rot60(s, t)
    dfs(p1, s, n-1)
    pr(s)
    dfs(s, u, n-1)
    pr(u)
    dfs(u, t, n-1)
    pr(t)
    dfs(t, p2, n-1)
     dfs if n == 0:
        return
    

     n == 0 n 0 return s = (p2 - p1) * (1/3) + p1 s (p2 - p1) * (1/3) + p1 (p2 - p1) * (1/3) p2 - p1 p2 p1 1/3 1 3 p1 t = (p2 - p1) * (2/3) + p1 t (p2 - p1) * (2/3) + p1 (p2 - p1) * (2/3) p2 - p1 p2 p1 2/3 2 3 p1 u = rot60(s, t) u rot60(s, t) rot60 s t dfs(p1, s, n-1) dfs p1 s n-1 n 1 pr(s) pr s dfs(s, u, n-1) dfs s u n-1 n 1 pr(u) pr u dfs(u, t, n-1) dfs u t n-1 n 1 pr(t) pr t dfs(t, p2, n-1) dfs t p2 n-1 n 1 p1 p1 p2 p2 n n n = int(input()) n int(input()) int input() input s = (0 + 0j) s 0 + 0j 0 0j t = (100 + 0j) t 100 + 0j 100 0j pr(s) pr s dfs(s, t, n) dfs s t n pr(t) pr t def rot60(s, t):
    v = t - s
    a = 1/2 + complex(0,(math.sqrt(3)/2))
    return v * a + s def rot60(s, t):
    v = t - s
    a = 1/2 + complex(0,(math.sqrt(3)/2))
    return v * a + s rot60 def pr(p):
    x = p.real
    y = p.imag
    print('%.10f %.10f'%(x, y)) def pr(p):
    x = p.real
    y = p.imag
    print('%.10f %.10f'%(x, y)) pr def dfs(p1, p2, n):
    if n == 0:
        return
    

    s = (p2 - p1) * (1/3) + p1
    t = (p2 - p1) * (2/3) + p1
    u = rot60(s, t)
    dfs(p1, s, n-1)
    pr(s)
    dfs(s, u, n-1)
    pr(u)
    dfs(u, t, n-1)
    pr(t)
    dfs(t, p2, n-1)
     def dfs(p1, p2, n):
    if n == 0:
        return
    

    s = (p2 - p1) * (1/3) + p1
    t = (p2 - p1) * (2/3) + p1
    u = rot60(s, t)
    dfs(p1, s, n-1)
    pr(s)
    dfs(s, u, n-1)
    pr(u)
    dfs(u, t, n-1)
    pr(t)
    dfs(t, p2, n-1)
     dfs t = (100 + 0j) 100 + 0j t s = (0 + 0j) 0 + 0j s n = int(input()) int(input()) n
import math

def rot60(s, t):
    v = t - s
    a = 1/2 + complex(0,(math.sqrt(3)/2))
    return v * a + s

def pr(p):
    x = p.real
    y = p.imag
    print('%.10f %.10f'%(x, y))

def dfs(p1, p2, n):
    if n == 0:
        return
    

    s = (p2 - p1) * (1/3) + p1
    t = (p2 - p1) * (2/3) + p1
    u = rot60(s, t)
    dfs(p1, s, n-1)
    pr(s)
    dfs(s, u, n-1)
    pr(u)
    dfs(u, t, n-1)
    pr(t)
    dfs(t, p2, n-1)
    
n = int(input())
s = (0 + 0j)
t = (100 + 0j)
pr(s)
dfs(s, t, n) 
pr(t)

