import math
def Koch(tops):
    n = len(tops)
    new_tops = [tops[0]]
    for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
    return new_tops

n = int(input())
tops = [[0.,0.],[100.,0.]]
for i in range(n):
    tops = Koch(tops)

for j in range(len(tops)):
    print(*tops[j], sep=' ')
 import math math def Koch(tops):
    n = len(tops)
    new_tops = [tops[0]]
    for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
    return new_tops Koch n = len(tops) n len(tops) len tops new_tops = [tops[0]] new_tops [tops[0]] tops[0] tops 0 for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
     i range(n-1) range n-1 n 1 b = [0,0] b [0,0] 0 0 a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3] a [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3] 2*tops[i][0]/3 + tops[i+1][0]/3 2*tops[i][0]/3 2*tops[i][0] 2 tops[i][0] [i] tops i 0 3 tops[i+1][0]/3 tops[i+1][0] [i+1] tops i+1 i 1 0 3 2*tops[i][1]/3 + tops[i+1][1]/3 2*tops[i][1]/3 2*tops[i][1] 2 tops[i][1] [i] tops i 1 3 tops[i+1][1]/3 tops[i+1][1] [i+1] tops i+1 i 1 1 3 c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3] c [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3] tops[i][0]/3 + 2*tops[i+1][0]/3 tops[i][0]/3 tops[i][0] [i] tops i 0 3 2*tops[i+1][0]/3 2*tops[i+1][0] 2 tops[i+1][0] [i+1] tops i+1 i 1 0 3 tops[i][1]/3 + 2*tops[i+1][1]/3 tops[i][1]/3 tops[i][1] [i] tops i 1 3 2*tops[i+1][1]/3 2*tops[i+1][1] 2 tops[i+1][1] [i+1] tops i+1 i 1 1 3 b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0] b[0] b 0 (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0] (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) (c[0]-a[0])*math.cos(math.radians(60)) c[0]-a[0] c[0] c 0 a[0] a 0 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 (c[1]-a[1])*math.sin(math.radians(60)) c[1]-a[1] c[1] c 1 a[1] a 1 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 a[0] a 0 b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1] b[1] b 1 (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1] (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) (c[0]-a[0])*math.sin(math.radians(60)) c[0]-a[0] c[0] c 0 a[0] a 0 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 (c[1]-a[1])*math.cos(math.radians(60)) c[1]-a[1] c[1] c 1 a[1] a 1 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 a[1] a 1 new_tops.append(a) new_tops.append new_tops append a new_tops.append(b) new_tops.append new_tops append b new_tops.append(c) new_tops.append new_tops append c new_tops.append(tops[i+1]) new_tops.append new_tops append tops[i+1] tops i+1 i 1 return new_tops new_tops tops tops n = int(input()) n int(input()) int input() input tops = [[0.,0.],[100.,0.]] tops [[0.,0.],[100.,0.]] [0.,0.] 0. 0. [100.,0.] 100. 0. for i in range(n):
    tops = Koch(tops) i range(n) range n tops = Koch(tops) tops Koch(tops) Koch tops for j in range(len(tops)):
    print(*tops[j], sep=' ') j range(len(tops)) range len(tops) len tops print(*tops[j], sep=' ') print *tops[j] tops[j] tops j sep=' ' sep ' ' n = int(input()) int(input()) n def Koch(tops):
    n = len(tops)
    new_tops = [tops[0]]
    for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
    return new_tops def Koch(tops):
    n = len(tops)
    new_tops = [tops[0]]
    for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
    return new_tops Koch tops = [[0.,0.],[100.,0.]] [[0.,0.],[100.,0.]] tops tops = Koch(tops) Koch(tops) tops
import math
def Koch(tops):
    n = len(tops)
    new_tops = [tops[0]]
    for i in range(n-1):
        b = [0,0]
        a = [2*tops[i][0]/3 + tops[i+1][0]/3, 2*tops[i][1]/3 + tops[i+1][1]/3]
        c = [tops[i][0]/3 + 2*tops[i+1][0]/3, tops[i][1]/3 + 2*tops[i+1][1]/3]
        b[0] = (c[0]-a[0])*math.cos(math.radians(60)) - (c[1]-a[1])*math.sin(math.radians(60)) + a[0]
        b[1] = (c[0]-a[0])*math.sin(math.radians(60)) + (c[1]-a[1])*math.cos(math.radians(60)) + a[1]
        new_tops.append(a)
        new_tops.append(b)
        new_tops.append(c)
        new_tops.append(tops[i+1])
    return new_tops

n = int(input())
tops = [[0.,0.],[100.,0.]]
for i in range(n):
    tops = Koch(tops)

for j in range(len(tops)):
    print(*tops[j], sep=' ')

