N = int(input())

def kccv(a, b, c, d):
    return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3]

ans = [[[0,0],[100,0]]]

for i in range(1,N+1):
    m = len(ans[i-1])
    newset = []
    for j in range(m-1):
        newset.append(ans[i-1][j])
        newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1])
        x1 = newdot[0]
        y1 = newdot[1]
        x2 = newdot[2]
        y2 = newdot[3]
        x3 = newdot[4]
        y3 = newdot[5]
        newset.append([x1,y1])
        newset.append([x2,y2])
        newset.append([x3,y3])
    newset.append(ans[i-1][m-1])
    ans.append(newset)
           
    
for i in range(len(ans[N])):
    print(ans[N][i][0],ans[N][i][1]) N = int(input()) N int(input()) int input() input def kccv(a, b, c, d):
    return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3] kccv return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3] [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3] a*2/3 + c/3 a*2/3 a*2 a 2 3 c/3 c 3 b*2/3 + d/3 b*2/3 b*2 b 2 3 d/3 d 3 a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6 a/2 + b*(3**0.5)/6 + c/2 a/2 + b*(3**0.5)/6 a/2 a 2 b*(3**0.5)/6 b*(3**0.5) b 3**0.5 3 0.5 6 c/2 c 2 d*(3**0.5)/6 d*(3**0.5) d 3**0.5 3 0.5 6 -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2 -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 -a*(3**0.5)/6 + b/2 -a*(3**0.5)/6 -a*(3**0.5) -a a 3**0.5 3 0.5 6 b/2 b 2 c*(3**0.5)/6 c*(3**0.5) c 3**0.5 3 0.5 6 d/2 d 2 a/3 + c*2/3 a/3 a 3 c*2/3 c*2 c 2 3 b/3 + d*2/3 b/3 b 3 d*2/3 d*2 d 2 3 a a b b c c d d ans = [[[0,0],[100,0]]] ans [[[0,0],[100,0]]] [[0,0],[100,0]] [0,0] 0 0 [100,0] 100 0 for i in range(1,N+1):
    m = len(ans[i-1])
    newset = []
    for j in range(m-1):
        newset.append(ans[i-1][j])
        newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1])
        x1 = newdot[0]
        y1 = newdot[1]
        x2 = newdot[2]
        y2 = newdot[3]
        x3 = newdot[4]
        y3 = newdot[5]
        newset.append([x1,y1])
        newset.append([x2,y2])
        newset.append([x3,y3])
    newset.append(ans[i-1][m-1])
    ans.append(newset)
           
     i range(1,N+1) range 1 N+1 N 1 m = len(ans[i-1]) m len(ans[i-1]) len ans[i-1] ans i-1 i 1 newset = [] newset [] for j in range(m-1):
        newset.append(ans[i-1][j])
        newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1])
        x1 = newdot[0]
        y1 = newdot[1]
        x2 = newdot[2]
        y2 = newdot[3]
        x3 = newdot[4]
        y3 = newdot[5]
        newset.append([x1,y1])
        newset.append([x2,y2])
        newset.append([x3,y3])
     j range(m-1) range m-1 m 1 newset.append(ans[i-1][j]) newset.append newset append ans[i-1][j] [i-1] ans i-1 i 1 j newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1]) newdot kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1]) kccv ans[i-1][j][0] [j] [i-1] ans i-1 i 1 j 0 ans[i-1][j][1] [j] [i-1] ans i-1 i 1 j 1 ans[i-1][j+1][0] [j+1] [i-1] ans i-1 i 1 j+1 j 1 0 ans[i-1][j+1][1] [j+1] [i-1] ans i-1 i 1 j+1 j 1 1 x1 = newdot[0] x1 newdot[0] newdot 0 y1 = newdot[1] y1 newdot[1] newdot 1 x2 = newdot[2] x2 newdot[2] newdot 2 y2 = newdot[3] y2 newdot[3] newdot 3 x3 = newdot[4] x3 newdot[4] newdot 4 y3 = newdot[5] y3 newdot[5] newdot 5 newset.append([x1,y1]) newset.append newset append [x1,y1] x1 y1 newset.append([x2,y2]) newset.append newset append [x2,y2] x2 y2 newset.append([x3,y3]) newset.append newset append [x3,y3] x3 y3 newset.append(ans[i-1][m-1]) newset.append newset append ans[i-1][m-1] [i-1] ans i-1 i 1 m-1 m 1 ans.append(newset) ans.append ans append newset for i in range(len(ans[N])):
    print(ans[N][i][0],ans[N][i][1]) i range(len(ans[N])) range len(ans[N]) len ans[N] ans N print(ans[N][i][0],ans[N][i][1]) print ans[N][i][0] [i] [N] ans N i 0 ans[N][i][1] [i] [N] ans N i 1 ans = [[[0,0],[100,0]]] [[[0,0],[100,0]]] ans y1 = newdot[1] newdot[1] y1 def kccv(a, b, c, d):
    return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3] def kccv(a, b, c, d):
    return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3] kccv y3 = newdot[5] newdot[5] y3 N = int(input()) int(input()) N m = len(ans[i-1]) len(ans[i-1]) m newset = [] [] newset y2 = newdot[3] newdot[3] y2 x1 = newdot[0] newdot[0] x1 newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1]) kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1]) newdot x2 = newdot[2] newdot[2] x2 x3 = newdot[4] newdot[4] x3
N = int(input())

def kccv(a, b, c, d):
    return [a*2/3 + c/3, b*2/3 + d/3, a/2 + b*(3**0.5)/6 + c/2 - d*(3**0.5)/6, -a*(3**0.5)/6 + b/2 + c*(3**0.5)/6 + d/2, a/3 + c*2/3, b/3 + d*2/3]

ans = [[[0,0],[100,0]]]

for i in range(1,N+1):
    m = len(ans[i-1])
    newset = []
    for j in range(m-1):
        newset.append(ans[i-1][j])
        newdot = kccv(ans[i-1][j][0], ans[i-1][j][1], ans[i-1][j+1][0], ans[i-1][j+1][1])
        x1 = newdot[0]
        y1 = newdot[1]
        x2 = newdot[2]
        y2 = newdot[3]
        x3 = newdot[4]
        y3 = newdot[5]
        newset.append([x1,y1])
        newset.append([x2,y2])
        newset.append([x3,y3])
    newset.append(ans[i-1][m-1])
    ans.append(newset)
           
    
for i in range(len(ans[N])):
    print(ans[N][i][0],ans[N][i][1])
