import math

n = int(input())

sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))
tan60 = math.tan(math.radians(60))

li = [[0, 0], [100, 0]]

for i in range(n):
    j = 0
    if n == 0:
        pass
    elif n == 1:
        li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]]
    else:
        for _ in range(4**i):
            sx = (li[j][0]*2 + li[j+1][0])/3
            sy = (li[j][1]*2 + li[j+1][1])/3
            tx = (li[j][0] + li[j+1][0]*2)/3
            ty = (li[j][1] + li[j+1][1]*2)/3
            ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx
            uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy
            li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]]
            j += 4

for i in range(len(li)):
    print('{:.8f} {:.8f}'.format(li[i][0], li[i][1])) import math math n = int(input()) n int(input()) int input() input 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 tan60 = math.tan(math.radians(60)) tan60 math.tan(math.radians(60)) math.tan math tan math.radians(60) math.radians math radians 60 li = [[0, 0], [100, 0]] li [[0, 0], [100, 0]] [0, 0] 0 0 [100, 0] 100 0 for i in range(n):
    j = 0
    if n == 0:
        pass
    elif n == 1:
        li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]]
    else:
        for _ in range(4**i):
            sx = (li[j][0]*2 + li[j+1][0])/3
            sy = (li[j][1]*2 + li[j+1][1])/3
            tx = (li[j][0] + li[j+1][0]*2)/3
            ty = (li[j][1] + li[j+1][1]*2)/3
            ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx
            uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy
            li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]]
            j += 4 i range(n) range n j = 0 j 0 if n == 0:
        pass
    elif n == 1:
        li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]]
    else:
        for _ in range(4**i):
            sx = (li[j][0]*2 + li[j+1][0])/3
            sy = (li[j][1]*2 + li[j+1][1])/3
            tx = (li[j][0] + li[j+1][0]*2)/3
            ty = (li[j][1] + li[j+1][1]*2)/3
            ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx
            uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy
            li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]]
            j += 4 n == 0 n 0 elif n == 1:
        li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]]
     n == 1 n 1 li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]] li [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]] [0, 0] 0 0 [100/3, 0] 100/3 100 3 0 [50, 100/3*sin60] 50 100/3*sin60 100/3 100 3 sin60 [100/3*2, 0] 100/3*2 100/3 100 3 2 0 [100, 0] 100 0 for _ in range(4**i):
            sx = (li[j][0]*2 + li[j+1][0])/3
            sy = (li[j][1]*2 + li[j+1][1])/3
            tx = (li[j][0] + li[j+1][0]*2)/3
            ty = (li[j][1] + li[j+1][1]*2)/3
            ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx
            uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy
            li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]]
            j += 4 _ range(4**i) range 4**i 4 i sx = (li[j][0]*2 + li[j+1][0])/3 sx (li[j][0]*2 + li[j+1][0])/3 li[j][0]*2 + li[j+1][0] li[j][0]*2 li[j][0] [j] li j 0 2 li[j+1][0] [j+1] li j+1 j 1 0 3 sy = (li[j][1]*2 + li[j+1][1])/3 sy (li[j][1]*2 + li[j+1][1])/3 li[j][1]*2 + li[j+1][1] li[j][1]*2 li[j][1] [j] li j 1 2 li[j+1][1] [j+1] li j+1 j 1 1 3 tx = (li[j][0] + li[j+1][0]*2)/3 tx (li[j][0] + li[j+1][0]*2)/3 li[j][0] + li[j+1][0]*2 li[j][0] [j] li j 0 li[j+1][0]*2 li[j+1][0] [j+1] li j+1 j 1 0 2 3 ty = (li[j][1] + li[j+1][1]*2)/3 ty (li[j][1] + li[j+1][1]*2)/3 li[j][1] + li[j+1][1]*2 li[j][1] [j] li j 1 li[j+1][1]*2 li[j+1][1] [j+1] li j+1 j 1 1 2 3 ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx ux (tx-sx)*cos60 - (ty-sy)*sin60 + sx (tx-sx)*cos60 - (ty-sy)*sin60 (tx-sx)*cos60 tx-sx tx sx cos60 (ty-sy)*sin60 ty-sy ty sy sin60 sx uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy uy (tx-sx)*sin60 + (ty-sy)*cos60 + sy (tx-sx)*sin60 + (ty-sy)*cos60 (tx-sx)*sin60 tx-sx tx sx sin60 (ty-sy)*cos60 ty-sy ty sy cos60 sy li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]] li[j+1:0] li j+1:0 j+1 j 1 0 [[sx, sy], [ux, uy], [tx, ty]] [sx, sy] sx sy [ux, uy] ux uy [tx, ty] tx ty j += 4 j 4 for i in range(len(li)):
    print('{:.8f} {:.8f}'.format(li[i][0], li[i][1])) i range(len(li)) range len(li) len li print('{:.8f} {:.8f}'.format(li[i][0], li[i][1])) print '{:.8f} {:.8f}'.format(li[i][0], li[i][1]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format li[i][0] [i] li i 0 li[i][1] [i] li i 1 li = [[0, 0], [100, 0]] [[0, 0], [100, 0]] li tx = (li[j][0] + li[j+1][0]*2)/3 (li[j][0] + li[j+1][0]*2)/3 tx n = int(input()) int(input()) n sin60 = math.sin(math.radians(60)) math.sin(math.radians(60)) sin60 sy = (li[j][1]*2 + li[j+1][1])/3 (li[j][1]*2 + li[j+1][1])/3 sy j = 0 0 j ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx (tx-sx)*cos60 - (ty-sy)*sin60 + sx ux j += 4 4 j ty = (li[j][1] + li[j+1][1]*2)/3 (li[j][1] + li[j+1][1]*2)/3 ty cos60 = math.cos(math.radians(60)) math.cos(math.radians(60)) cos60 uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy (tx-sx)*sin60 + (ty-sy)*cos60 + sy uy tan60 = math.tan(math.radians(60)) math.tan(math.radians(60)) tan60 sx = (li[j][0]*2 + li[j+1][0])/3 (li[j][0]*2 + li[j+1][0])/3 sx li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]] [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]] li
import math

n = int(input())

sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))
tan60 = math.tan(math.radians(60))

li = [[0, 0], [100, 0]]

for i in range(n):
    j = 0
    if n == 0:
        pass
    elif n == 1:
        li = [[0, 0], [100/3, 0], [50, 100/3*sin60], [100/3*2, 0], [100, 0]]
    else:
        for _ in range(4**i):
            sx = (li[j][0]*2 + li[j+1][0])/3
            sy = (li[j][1]*2 + li[j+1][1])/3
            tx = (li[j][0] + li[j+1][0]*2)/3
            ty = (li[j][1] + li[j+1][1]*2)/3
            ux = (tx-sx)*cos60 - (ty-sy)*sin60 + sx
            uy = (tx-sx)*sin60 + (ty-sy)*cos60 + sy
            li[j+1:0] = [[sx, sy], [ux, uy], [tx, ty]]
            j += 4

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