n = int(input())

P = [(0.0,0.0), (100.0, 0)]

import copy
import math
sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))
for _ in range(n):
    next_p = []
    for p1, p2 in zip(P[:-1], P[1:]):
        l = (p1[0]*2/3+p2[0]*1/3, p1[1]*2/3+p2[1]*1/3) 
        r = (p1[0]*1/3+p2[0]*2/3, p1[1]*1/3+p2[1]*2/3)
        x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0]
        y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1]
        next_p.append(p1)
        next_p.append(l)
        next_p.append((x, y))
        next_p.append(r)
    next_p.append(P[-1])
    P = copy.copy(next_p)

for p in P:
    print(p[0], p[1])
        
     n = int(input()) n int(input()) int input() input P = [(0.0,0.0), (100.0, 0)] P [(0.0,0.0), (100.0, 0)] (0.0,0.0) 0.0 0.0 (100.0, 0) 100.0 0 import copy copy import math math sin60 = math.sin(math.radians(60)) sin60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 cos60 = math.cos(math.radians(60)) cos60 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 for _ in range(n):
    next_p = []
    for p1, p2 in zip(P[:-1], P[1:]):
        l = (p1[0]*2/3+p2[0]*1/3, p1[1]*2/3+p2[1]*1/3) 
        r = (p1[0]*1/3+p2[0]*2/3, p1[1]*1/3+p2[1]*2/3)
        x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0]
        y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1]
        next_p.append(p1)
        next_p.append(l)
        next_p.append((x, y))
        next_p.append(r)
    next_p.append(P[-1])
    P = copy.copy(next_p) _ range(n) range n next_p = [] next_p [] for p1, p2 in zip(P[:-1], P[1:]):
        l = (p1[0]*2/3+p2[0]*1/3, p1[1]*2/3+p2[1]*1/3) 
        r = (p1[0]*1/3+p2[0]*2/3, p1[1]*1/3+p2[1]*2/3)
        x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0]
        y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1]
        next_p.append(p1)
        next_p.append(l)
        next_p.append((x, y))
        next_p.append(r)
     p1 p2 zip(P[:-1], P[1:]) zip P[:-1] P :-1 -1 P[1:] P 1: 1 l = (p1[0]*2/3+p2[0]*1/3, p1[1]*2/3+p2[1]*1/3) l (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]*2/3 p1[0]*2 p1[0] p1 0 2 3 p2[0]*1/3 p2[0]*1 p2[0] p2 0 1 3 p1[1]*2/3+p2[1]*1/3 p1[1]*2/3 p1[1]*2 p1[1] p1 1 2 3 p2[1]*1/3 p2[1]*1 p2[1] p2 1 1 3 r = (p1[0]*1/3+p2[0]*2/3, p1[1]*1/3+p2[1]*2/3) r (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]*1/3 p1[0]*1 p1[0] p1 0 1 3 p2[0]*2/3 p2[0]*2 p2[0] p2 0 2 3 p1[1]*1/3+p2[1]*2/3 p1[1]*1/3 p1[1]*1 p1[1] p1 1 1 3 p2[1]*2/3 p2[1]*2 p2[1] p2 1 2 3 x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0] x cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0] cos60*(r[0]-l[0])-sin60*(r[1]-l[1]) cos60*(r[0]-l[0]) cos60 r[0]-l[0] r[0] r 0 l[0] l 0 sin60*(r[1]-l[1]) sin60 r[1]-l[1] r[1] r 1 l[1] l 1 l[0] l 0 y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1] y sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1] sin60*(r[0]-l[0])+cos60*(r[1]-l[1]) sin60*(r[0]-l[0]) sin60 r[0]-l[0] r[0] r 0 l[0] l 0 cos60*(r[1]-l[1]) cos60 r[1]-l[1] r[1] r 1 l[1] l 1 l[1] l 1 next_p.append(p1) next_p.append next_p append p1 next_p.append(l) next_p.append next_p append l next_p.append((x, y)) next_p.append next_p append (x, y) x y next_p.append(r) next_p.append next_p append r next_p.append(P[-1]) next_p.append next_p append P[-1] P -1 P = copy.copy(next_p) P copy.copy(next_p) copy.copy copy copy next_p for p in P:
    print(p[0], p[1])
        
     p P print(p[0], p[1]) print p[0] p 0 p[1] p 1 l = (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[1]*2/3+p2[1]*1/3) l r = (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[1]*1/3+p2[1]*2/3) r x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0] cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0] x sin60 = math.sin(math.radians(60)) math.sin(math.radians(60)) sin60 y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1] sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1] y P = copy.copy(next_p) copy.copy(next_p) P P = [(0.0,0.0), (100.0, 0)] [(0.0,0.0), (100.0, 0)] P next_p = [] [] next_p cos60 = math.cos(math.radians(60)) math.cos(math.radians(60)) cos60 n = int(input()) int(input()) n
n = int(input())

P = [(0.0,0.0), (100.0, 0)]

import copy
import math
sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))
for _ in range(n):
    next_p = []
    for p1, p2 in zip(P[:-1], P[1:]):
        l = (p1[0]*2/3+p2[0]*1/3, p1[1]*2/3+p2[1]*1/3) 
        r = (p1[0]*1/3+p2[0]*2/3, p1[1]*1/3+p2[1]*2/3)
        x = cos60*(r[0]-l[0])-sin60*(r[1]-l[1])+l[0]
        y = sin60*(r[0]-l[0])+cos60*(r[1]-l[1])+l[1]
        next_p.append(p1)
        next_p.append(l)
        next_p.append((x, y))
        next_p.append(r)
    next_p.append(P[-1])
    P = copy.copy(next_p)

for p in P:
    print(p[0], p[1])
        
    
