import math

n = int(input())

point = [(0, 0), (100, 0)]

for i in range(n):
    len_point = len(point)
    tmp = []
    for j in range(len_point - 1):
        x1, y1 = point[j]
        x2, y2 = point[j+1]
        sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3
        tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3
        ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx
        uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy
        tmp.append((x1, y1))
        tmp.append((sx, sy))
        tmp.append((ux, uy))
        tmp.append((tx, ty)) 
    tmp.append((100, 0))
    point = tmp

for x, y in point:
    print(f"{x:.8f} {y:.8f}") import math math n = int(input()) n int(input()) int input() input point = [(0, 0), (100, 0)] point [(0, 0), (100, 0)] (0, 0) 0 0 (100, 0) 100 0 for i in range(n):
    len_point = len(point)
    tmp = []
    for j in range(len_point - 1):
        x1, y1 = point[j]
        x2, y2 = point[j+1]
        sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3
        tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3
        ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx
        uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy
        tmp.append((x1, y1))
        tmp.append((sx, sy))
        tmp.append((ux, uy))
        tmp.append((tx, ty)) 
    tmp.append((100, 0))
    point = tmp i range(n) range n len_point = len(point) len_point len(point) len point tmp = [] tmp [] for j in range(len_point - 1):
        x1, y1 = point[j]
        x2, y2 = point[j+1]
        sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3
        tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3
        ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx
        uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy
        tmp.append((x1, y1))
        tmp.append((sx, sy))
        tmp.append((ux, uy))
        tmp.append((tx, ty)) 
     j range(len_point - 1) range len_point - 1 len_point 1 x1, y1 = point[j] x1 point[j] point j y1 x2, y2 = point[j+1] x2 point[j+1] point j+1 j 1 y2 sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3 sx (2 * x1 + x2) / 3 2 * x1 + x2 2 * x1 2 x1 x2 3 sy (2 * y1 + y2) / 3 2 * y1 + y2 2 * y1 2 y1 y2 3 tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3 tx (x1 + 2 * x2) / 3 x1 + 2 * x2 x1 2 * x2 2 x2 3 ty (y1 + 2 * y2) / 3 y1 + 2 * y2 y1 2 * y2 2 y2 3 ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx ux (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) (tx - sx) * math.cos(math.pi / 3) tx - sx tx sx math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 (ty - sy) * math.sin(math.pi / 3) ty - sy ty sy math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 sx uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy uy (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) (tx - sx) * math.sin(math.pi / 3) tx - sx tx sx math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 (ty - sy) * math.cos(math.pi / 3) ty - sy ty sy math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 sy tmp.append((x1, y1)) tmp.append tmp append (x1, y1) x1 y1 tmp.append((sx, sy)) tmp.append tmp append (sx, sy) sx sy tmp.append((ux, uy)) tmp.append tmp append (ux, uy) ux uy tmp.append((tx, ty)) tmp.append tmp append (tx, ty) tx ty tmp.append((100, 0)) tmp.append tmp append (100, 0) 100 0 point = tmp point tmp for x, y in point:
    print(f"{x:.8f} {y:.8f}") x y point print(f"{x:.8f} {y:.8f}") print f"{x:.8f} {y:.8f}" sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3 (2 * x1 + x2) / 3 sx x1, y1 = point[j] point[j] x1 tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3 (x1 + 2 * x2) / 3 tx y1 = point[j] point[j] y1 n = int(input()) int(input()) n x2, y2 = point[j+1] point[j+1] x2 point = tmp tmp point tmp = [] [] tmp uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy uy ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3 (y1 + 2 * y2) / 3 ty y2 = point[j+1] point[j+1] y2 ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx ux point = [(0, 0), (100, 0)] [(0, 0), (100, 0)] point len_point = len(point) len(point) len_point sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3 (2 * y1 + y2) / 3 sy
import math

n = int(input())

point = [(0, 0), (100, 0)]

for i in range(n):
    len_point = len(point)
    tmp = []
    for j in range(len_point - 1):
        x1, y1 = point[j]
        x2, y2 = point[j+1]
        sx, sy = (2 * x1 + x2) / 3, (2 * y1 + y2) / 3
        tx, ty = (x1 + 2 * x2) / 3, (y1 + 2 * y2) / 3
        ux = (tx - sx) * math.cos(math.pi / 3) - (ty - sy) * math.sin(math.pi / 3) + sx
        uy = (tx - sx) * math.sin(math.pi / 3) + (ty - sy) * math.cos(math.pi / 3) + sy
        tmp.append((x1, y1))
        tmp.append((sx, sy))
        tmp.append((ux, uy))
        tmp.append((tx, ty)) 
    tmp.append((100, 0))
    point = tmp

for x, y in point:
    print(f"{x:.8f} {y:.8f}")
