import math

n = int(input())
koch = [(0.0, 0.0), (100.0, 0.0)]
SIN60 = math.sin(math.radians(60))

for i in range(n):
    nextKoch = []
    for j in range(len(koch) - 1):
        p1 = koch[j]
        p2 = koch[j+1]
        # s, t は p1, p2 を 3 等分する点
        s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3)
        t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3)
        # u は s を中心として  t を 60ª 回転させた点
        ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0]
        uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1]
        u = (ux, uy)
        nextKoch[len(nextKoch):len(nextKoch)] = [p1, s, u, t]
    nextKoch.append(koch[-1])
    koch = nextKoch

for i in range(len(koch)):
    print('{0:.8f} {1:.8f}'.format(koch[i][0], koch[i][1]))
 import math math n = int(input()) n int(input()) int input() input koch = [(0.0, 0.0), (100.0, 0.0)] koch [(0.0, 0.0), (100.0, 0.0)] (0.0, 0.0) 0.0 0.0 (100.0, 0.0) 100.0 0.0 SIN60 = math.sin(math.radians(60)) SIN60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 for i in range(n):
    nextKoch = []
    for j in range(len(koch) - 1):
        p1 = koch[j]
        p2 = koch[j+1]
        # s, t は p1, p2 を 3 等分する点
        s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3)
        t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3)
        # u は s を中心として  t を 60ª 回転させた点
        ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0]
        uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1]
        u = (ux, uy)
        nextKoch[len(nextKoch):len(nextKoch)] = [p1, s, u, t]
    nextKoch.append(koch[-1])
    koch = nextKoch i range(n) range n nextKoch = [] nextKoch [] for j in range(len(koch) - 1):
        p1 = koch[j]
        p2 = koch[j+1]
        # s, t は p1, p2 を 3 等分する点
        s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3)
        t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3)
        # u は s を中心として  t を 60ª 回転させた点
        ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0]
        uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1]
        u = (ux, uy)
        nextKoch[len(nextKoch):len(nextKoch)] = [p1, s, u, t]
     j range(len(koch) - 1) range len(koch) - 1 len(koch) len koch 1 p1 = koch[j] p1 koch[j] koch j p2 = koch[j+1] p2 koch[j+1] koch j+1 j 1 s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3) s ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3) (p1[0] * 2 + p2[0]) / 3 p1[0] * 2 + p2[0] p1[0] * 2 p1[0] p1 0 2 p2[0] p2 0 3 (p1[1] * 2 + p2[1]) / 3 p1[1] * 2 + p2[1] p1[1] * 2 p1[1] p1 1 2 p2[1] p2 1 3 t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3) t ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3) (p1[0] + p2[0] * 2) / 3 p1[0] + p2[0] * 2 p1[0] p1 0 p2[0] * 2 p2[0] p2 0 2 3 (p1[1] + p2[1] * 2) / 3 p1[1] + p2[1] * 2 p1[1] p1 1 p2[1] * 2 p2[1] p2 1 2 3 ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0] ux (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0] (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 (t[0]-s[0])/2 t[0]-s[0] t[0] t 0 s[0] s 0 2 (t[1]-s[1])*SIN60 t[1]-s[1] t[1] t 1 s[1] s 1 SIN60 s[0] s 0 uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1] uy (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1] (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 (t[0]-s[0])*SIN60 t[0]-s[0] t[0] t 0 s[0] s 0 SIN60 (t[1]-s[1])/2 t[1]-s[1] t[1] t 1 s[1] s 1 2 s[1] s 1 u = (ux, uy) u (ux, uy) ux uy nextKoch[len(nextKoch):len(nextKoch)] = [p1, s, u, t] nextKoch[len(nextKoch):len(nextKoch)] nextKoch len(nextKoch):len(nextKoch) len(nextKoch) len nextKoch len(nextKoch) len nextKoch [p1, s, u, t] p1 s u t nextKoch.append(koch[-1]) nextKoch.append nextKoch append koch[-1] koch -1 koch = nextKoch koch nextKoch for i in range(len(koch)):
    print('{0:.8f} {1:.8f}'.format(koch[i][0], koch[i][1])) i range(len(koch)) range len(koch) len koch print('{0:.8f} {1:.8f}'.format(koch[i][0], koch[i][1])) print '{0:.8f} {1:.8f}'.format(koch[i][0], koch[i][1]) '{0:.8f} {1:.8f}'.format '{0:.8f} {1:.8f}' format koch[i][0] [i] koch i 0 koch[i][1] [i] koch i 1 p2 = koch[j+1] koch[j+1] p2 ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0] (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0] ux s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3) ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3) s koch = nextKoch nextKoch koch koch = [(0.0, 0.0), (100.0, 0.0)] [(0.0, 0.0), (100.0, 0.0)] koch SIN60 = math.sin(math.radians(60)) math.sin(math.radians(60)) SIN60 p1 = koch[j] koch[j] p1 n = int(input()) int(input()) n u = (ux, uy) (ux, uy) u nextKoch = [] [] nextKoch t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3) ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3) t uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1] (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1] uy
import math

n = int(input())
koch = [(0.0, 0.0), (100.0, 0.0)]
SIN60 = math.sin(math.radians(60))

for i in range(n):
    nextKoch = []
    for j in range(len(koch) - 1):
        p1 = koch[j]
        p2 = koch[j+1]
        # s, t は p1, p2 を 3 等分する点
        s = ((p1[0] * 2 + p2[0]) / 3, (p1[1] * 2 + p2[1]) / 3)
        t = ((p1[0] + p2[0] * 2) / 3, (p1[1] + p2[1] * 2) / 3)
        # u は s を中心として  t を 60ª 回転させた点
        ux = (t[0]-s[0])/2 - (t[1]-s[1])*SIN60 + s[0]
        uy = (t[0]-s[0])*SIN60 + (t[1]-s[1])/2 + s[1]
        u = (ux, uy)
        nextKoch[len(nextKoch):len(nextKoch)] = [p1, s, u, t]
    nextKoch.append(koch[-1])
    koch = nextKoch

for i in range(len(koch)):
    print('{0:.8f} {1:.8f}'.format(koch[i][0], koch[i][1]))

