import math

sin = math.sin(math.pi/3)
cos = math.cos(math.pi/3)

n = int(input())
p1, p2 = (0, 0), (100, 0)
ans_ls = [p1, p2]

def koch(d, p1, p2):
    if d == n:
        return
    
    s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1])
    t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1])
    u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1])
    ans_ls.extend([s, u, t])
    
    koch(d+1, p1, s)
    print(*s)
    koch(d+1, s, u)
    print(*u)
    koch(d+1, u, t)
    print(*t)
    koch(d+1, t, p2)
    
print(*p1)
koch(0, p1, p2)
print(*p2) import math math sin = math.sin(math.pi/3) sin math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 cos = math.cos(math.pi/3) cos math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 n = int(input()) n int(input()) int input() input p1, p2 = (0, 0), (100, 0) p1 (0, 0) 0 0 p2 (100, 0) 100 0 ans_ls = [p1, p2] ans_ls [p1, p2] p1 p2 def koch(d, p1, p2):
    if d == n:
        return
    
    s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1])
    t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1])
    u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1])
    ans_ls.extend([s, u, t])
    
    koch(d+1, p1, s)
    print(*s)
    koch(d+1, s, u)
    print(*u)
    koch(d+1, u, t)
    print(*t)
    koch(d+1, t, p2)
     koch if d == n:
        return
    
     d == n d n return s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1]) s (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1]) 2/3 * p1[0] + 1/3 * p2[0] 2/3 * p1[0] 2/3 2 3 p1[0] p1 0 1/3 * p2[0] 1/3 1 3 p2[0] p2 0 2/3 * p1[1] + 1/3 * p2[1] 2/3 * p1[1] 2/3 2 3 p1[1] p1 1 1/3 * p2[1] 1/3 1 3 p2[1] p2 1 t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1]) t (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1]) 1/3 * p1[0] + 2/3 * p2[0] 1/3 * p1[0] 1/3 1 3 p1[0] p1 0 2/3 * p2[0] 2/3 2 3 p2[0] p2 0 1/3 * p1[1] + 2/3 * p2[1] 1/3 * p1[1] 1/3 1 3 p1[1] p1 1 2/3 * p2[1] 2/3 2 3 p2[1] p2 1 u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1]) u ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1]) (t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0] (t[0] - s[0]) * cos - (t[1] - s[1]) * sin (t[0] - s[0]) * cos t[0] - s[0] t[0] t 0 s[0] s 0 cos (t[1] - s[1]) * sin t[1] - s[1] t[1] t 1 s[1] s 1 sin s[0] s 0 (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1] (t[0] - s[0]) * sin + (t[1] - s[1]) * cos (t[0] - s[0]) * sin t[0] - s[0] t[0] t 0 s[0] s 0 sin (t[1] - s[1]) * cos t[1] - s[1] t[1] t 1 s[1] s 1 cos s[1] s 1 ans_ls.extend([s, u, t]) ans_ls.extend ans_ls extend [s, u, t] s u t koch(d+1, p1, s) koch d+1 d 1 p1 s print(*s) print *s s koch(d+1, s, u) koch d+1 d 1 s u print(*u) print *u u koch(d+1, u, t) koch d+1 d 1 u t print(*t) print *t t koch(d+1, t, p2) koch d+1 d 1 t p2 d d p1 p1 p2 p2 print(*p1) print *p1 p1 koch(0, p1, p2) koch 0 p1 p2 print(*p2) print *p2 p2 sin = math.sin(math.pi/3) math.sin(math.pi/3) sin p2 = (0, 0), (100, 0) (100, 0) p2 ans_ls = [p1, p2] [p1, p2] ans_ls n = int(input()) int(input()) n cos = math.cos(math.pi/3) math.cos(math.pi/3) cos p1, p2 = (0, 0), (100, 0) (0, 0) p1 def koch(d, p1, p2):
    if d == n:
        return
    
    s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1])
    t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1])
    u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1])
    ans_ls.extend([s, u, t])
    
    koch(d+1, p1, s)
    print(*s)
    koch(d+1, s, u)
    print(*u)
    koch(d+1, u, t)
    print(*t)
    koch(d+1, t, p2)
     def koch(d, p1, p2):
    if d == n:
        return
    
    s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1])
    t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1])
    u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1])
    ans_ls.extend([s, u, t])
    
    koch(d+1, p1, s)
    print(*s)
    koch(d+1, s, u)
    print(*u)
    koch(d+1, u, t)
    print(*t)
    koch(d+1, t, p2)
     koch
import math

sin = math.sin(math.pi/3)
cos = math.cos(math.pi/3)

n = int(input())
p1, p2 = (0, 0), (100, 0)
ans_ls = [p1, p2]

def koch(d, p1, p2):
    if d == n:
        return
    
    s = (2/3 * p1[0] + 1/3 * p2[0], 2/3 * p1[1] + 1/3 * p2[1])
    t = (1/3 * p1[0] + 2/3 * p2[0], 1/3 * p1[1] + 2/3 * p2[1])
    u = ((t[0] - s[0]) * cos - (t[1] - s[1]) * sin + s[0], (t[0] - s[0]) * sin + (t[1] - s[1]) * cos + s[1])
    ans_ls.extend([s, u, t])
    
    koch(d+1, p1, s)
    print(*s)
    koch(d+1, s, u)
    print(*u)
    koch(d+1, u, t)
    print(*t)
    koch(d+1, t, p2)
    
print(*p1)
koch(0, p1, p2)
print(*p2)
