from math import sqrt
n = int(input())
p1 = complex(0, 0)
p2 = complex(100, 0)
phi = complex(1/2, sqrt(3)/2)

def makeCurve(p1, p2, cnt):
    if cnt >= n:
        return
    s = p1 + (p2-p1)/3
    t = p1 + (p2-p1)*2/3
    u = (t-s)*phi+s
    
    
    makeCurve(p1, s, cnt + 1)
    print(s.real, s.imag)
    makeCurve(s, u, cnt + 1)
    print(u.real, u.imag)
    makeCurve(u, t, cnt + 1)
    print(t.real, t.imag)
    makeCurve(t, p2, cnt + 1)

print(p1.real, p1.imag)
makeCurve(p1, p2, 0)
print(p2.real, p2.imag) from math import sqrt n = int(input()) n int(input()) int input() input p1 = complex(0, 0) p1 complex(0, 0) complex 0 0 p2 = complex(100, 0) p2 complex(100, 0) complex 100 0 phi = complex(1/2, sqrt(3)/2) phi complex(1/2, sqrt(3)/2) complex 1/2 1 2 sqrt(3)/2 sqrt(3) sqrt 3 2 def makeCurve(p1, p2, cnt):
    if cnt >= n:
        return
    s = p1 + (p2-p1)/3
    t = p1 + (p2-p1)*2/3
    u = (t-s)*phi+s
    
    
    makeCurve(p1, s, cnt + 1)
    print(s.real, s.imag)
    makeCurve(s, u, cnt + 1)
    print(u.real, u.imag)
    makeCurve(u, t, cnt + 1)
    print(t.real, t.imag)
    makeCurve(t, p2, cnt + 1) makeCurve if cnt >= n:
        return
     cnt >= n cnt n return s = p1 + (p2-p1)/3 s p1 + (p2-p1)/3 p1 (p2-p1)/3 p2-p1 p2 p1 3 t = p1 + (p2-p1)*2/3 t p1 + (p2-p1)*2/3 p1 (p2-p1)*2/3 (p2-p1)*2 p2-p1 p2 p1 2 3 u = (t-s)*phi+s u (t-s)*phi+s (t-s)*phi t-s t s phi s makeCurve(p1, s, cnt + 1) makeCurve p1 s cnt + 1 cnt 1 print(s.real, s.imag) print s.real s real s.imag s imag makeCurve(s, u, cnt + 1) makeCurve s u cnt + 1 cnt 1 print(u.real, u.imag) print u.real u real u.imag u imag makeCurve(u, t, cnt + 1) makeCurve u t cnt + 1 cnt 1 print(t.real, t.imag) print t.real t real t.imag t imag makeCurve(t, p2, cnt + 1) makeCurve t p2 cnt + 1 cnt 1 p1 p1 p2 p2 cnt cnt print(p1.real, p1.imag) print p1.real p1 real p1.imag p1 imag makeCurve(p1, p2, 0) makeCurve p1 p2 0 print(p2.real, p2.imag) print p2.real p2 real p2.imag p2 imag def makeCurve(p1, p2, cnt):
    if cnt >= n:
        return
    s = p1 + (p2-p1)/3
    t = p1 + (p2-p1)*2/3
    u = (t-s)*phi+s
    
    
    makeCurve(p1, s, cnt + 1)
    print(s.real, s.imag)
    makeCurve(s, u, cnt + 1)
    print(u.real, u.imag)
    makeCurve(u, t, cnt + 1)
    print(t.real, t.imag)
    makeCurve(t, p2, cnt + 1) def makeCurve(p1, p2, cnt):
    if cnt >= n:
        return
    s = p1 + (p2-p1)/3
    t = p1 + (p2-p1)*2/3
    u = (t-s)*phi+s
    
    
    makeCurve(p1, s, cnt + 1)
    print(s.real, s.imag)
    makeCurve(s, u, cnt + 1)
    print(u.real, u.imag)
    makeCurve(u, t, cnt + 1)
    print(t.real, t.imag)
    makeCurve(t, p2, cnt + 1) makeCurve p2 = complex(100, 0) complex(100, 0) p2 phi = complex(1/2, sqrt(3)/2) complex(1/2, sqrt(3)/2) phi p1 = complex(0, 0) complex(0, 0) p1 n = int(input()) int(input()) n
from math import sqrt
n = int(input())
p1 = complex(0, 0)
p2 = complex(100, 0)
phi = complex(1/2, sqrt(3)/2)

def makeCurve(p1, p2, cnt):
    if cnt >= n:
        return
    s = p1 + (p2-p1)/3
    t = p1 + (p2-p1)*2/3
    u = (t-s)*phi+s
    
    
    makeCurve(p1, s, cnt + 1)
    print(s.real, s.imag)
    makeCurve(s, u, cnt + 1)
    print(u.real, u.imag)
    makeCurve(u, t, cnt + 1)
    print(t.real, t.imag)
    makeCurve(t, p2, cnt + 1)

print(p1.real, p1.imag)
makeCurve(p1, p2, 0)
print(p2.real, p2.imag)
