# -*- coding: utf-8 -*-

import sys
import os
import math


n = int(input())
p0 = (0, 0)
p1 = (100, 0)

def koch(depth, p0, p1):
    if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
    sx = 2 / 3 * p0[0] + 1 / 3 * p1[0]
    sy = 2 / 3 * p0[1] + 1 / 3 * p1[1]
    s = (sx, sy)

    tx = 1 / 3 * p0[0] + 2 / 3 * p1[0]
    ty = 1 / 3 * p0[1] + 2 / 3 * p1[1]
    t = (tx, ty)

    theta = math.radians(60)
    ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx
    uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy
    u = (ux, uy)

    # ????????? s, u, t?????¨???
    koch(depth - 1, p0, s)
    print(*s)
    koch(depth - 1, s, u)
    print(*u)
    koch(depth - 1, u, t)
    print(*t)
    koch(depth - 1, t, p1)

print(*p0)
koch(n, p0, p1)
print(*p1) import sys sys import os os import math math n = int(input()) n int(input()) int input() input p0 = (0, 0) p0 (0, 0) 0 0 p1 = (100, 0) p1 (100, 0) 100 0 def koch(depth, p0, p1):
    if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
    sx = 2 / 3 * p0[0] + 1 / 3 * p1[0]
    sy = 2 / 3 * p0[1] + 1 / 3 * p1[1]
    s = (sx, sy)

    tx = 1 / 3 * p0[0] + 2 / 3 * p1[0]
    ty = 1 / 3 * p0[1] + 2 / 3 * p1[1]
    t = (tx, ty)

    theta = math.radians(60)
    ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx
    uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy
    u = (ux, uy)

    # ????????? s, u, t?????¨???
    koch(depth - 1, p0, s)
    print(*s)
    koch(depth - 1, s, u)
    print(*u)
    koch(depth - 1, u, t)
    print(*t)
    koch(depth - 1, t, p1) koch if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
     depth == 0 depth 0 return sx = 2 / 3 * p0[0] + 1 / 3 * p1[0] sx 2 / 3 * p0[0] + 1 / 3 * p1[0] 2 / 3 * p0[0] 2 / 3 2 3 p0[0] p0 0 1 / 3 * p1[0] 1 / 3 1 3 p1[0] p1 0 sy = 2 / 3 * p0[1] + 1 / 3 * p1[1] sy 2 / 3 * p0[1] + 1 / 3 * p1[1] 2 / 3 * p0[1] 2 / 3 2 3 p0[1] p0 1 1 / 3 * p1[1] 1 / 3 1 3 p1[1] p1 1 s = (sx, sy) s (sx, sy) sx sy tx = 1 / 3 * p0[0] + 2 / 3 * p1[0] tx 1 / 3 * p0[0] + 2 / 3 * p1[0] 1 / 3 * p0[0] 1 / 3 1 3 p0[0] p0 0 2 / 3 * p1[0] 2 / 3 2 3 p1[0] p1 0 ty = 1 / 3 * p0[1] + 2 / 3 * p1[1] ty 1 / 3 * p0[1] + 2 / 3 * p1[1] 1 / 3 * p0[1] 1 / 3 1 3 p0[1] p0 1 2 / 3 * p1[1] 2 / 3 2 3 p1[1] p1 1 t = (tx, ty) t (tx, ty) tx ty theta = math.radians(60) theta math.radians(60) math.radians math radians 60 ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx ux math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) math.cos(theta) * (tx - sx) math.cos(theta) math.cos math cos theta tx - sx tx sx math.sin(theta) * (ty - sy) math.sin(theta) math.sin math sin theta ty - sy ty sy sx uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy uy math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) math.sin(theta) * (tx - sx) math.sin(theta) math.sin math sin theta tx - sx tx sx math.cos(theta) * (ty - sy) math.cos(theta) math.cos math cos theta ty - sy ty sy sy u = (ux, uy) u (ux, uy) ux uy koch(depth - 1, p0, s) koch depth - 1 depth 1 p0 s print(*s) print *s s koch(depth - 1, s, u) koch depth - 1 depth 1 s u print(*u) print *u u koch(depth - 1, u, t) koch depth - 1 depth 1 u t print(*t) print *t t koch(depth - 1, t, p1) koch depth - 1 depth 1 t p1 depth depth p0 p0 p1 p1 print(*p0) print *p0 p0 koch(n, p0, p1) koch n p0 p1 print(*p1) print *p1 p1 p1 = (100, 0) (100, 0) p1 n = int(input()) int(input()) n def koch(depth, p0, p1):
    if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
    sx = 2 / 3 * p0[0] + 1 / 3 * p1[0]
    sy = 2 / 3 * p0[1] + 1 / 3 * p1[1]
    s = (sx, sy)

    tx = 1 / 3 * p0[0] + 2 / 3 * p1[0]
    ty = 1 / 3 * p0[1] + 2 / 3 * p1[1]
    t = (tx, ty)

    theta = math.radians(60)
    ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx
    uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy
    u = (ux, uy)

    # ????????? s, u, t?????¨???
    koch(depth - 1, p0, s)
    print(*s)
    koch(depth - 1, s, u)
    print(*u)
    koch(depth - 1, u, t)
    print(*t)
    koch(depth - 1, t, p1) def koch(depth, p0, p1):
    if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
    sx = 2 / 3 * p0[0] + 1 / 3 * p1[0]
    sy = 2 / 3 * p0[1] + 1 / 3 * p1[1]
    s = (sx, sy)

    tx = 1 / 3 * p0[0] + 2 / 3 * p1[0]
    ty = 1 / 3 * p0[1] + 2 / 3 * p1[1]
    t = (tx, ty)

    theta = math.radians(60)
    ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx
    uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy
    u = (ux, uy)

    # ????????? s, u, t?????¨???
    koch(depth - 1, p0, s)
    print(*s)
    koch(depth - 1, s, u)
    print(*u)
    koch(depth - 1, u, t)
    print(*t)
    koch(depth - 1, t, p1) koch p0 = (0, 0) (0, 0) p0
# -*- coding: utf-8 -*-

import sys
import os
import math


n = int(input())
p0 = (0, 0)
p1 = (100, 0)

def koch(depth, p0, p1):
    if depth == 0:
        return

    # s = 2/3 p0 + 1/3 p1
    sx = 2 / 3 * p0[0] + 1 / 3 * p1[0]
    sy = 2 / 3 * p0[1] + 1 / 3 * p1[1]
    s = (sx, sy)

    tx = 1 / 3 * p0[0] + 2 / 3 * p1[0]
    ty = 1 / 3 * p0[1] + 2 / 3 * p1[1]
    t = (tx, ty)

    theta = math.radians(60)
    ux = math.cos(theta) * (tx - sx) - math.sin(theta) * (ty - sy) + sx
    uy = math.sin(theta) * (tx - sx) + math.cos(theta) * (ty - sy) + sy
    u = (ux, uy)

    # ????????? s, u, t?????¨???
    koch(depth - 1, p0, s)
    print(*s)
    koch(depth - 1, s, u)
    print(*u)
    koch(depth - 1, u, t)
    print(*t)
    koch(depth - 1, t, p1)

print(*p0)
koch(n, p0, p1)
print(*p1)