from math import cos, sin, pi

n = int(input())

p1 = (0, 0)
p2 = (100, 0)
theta = pi/3


def koch(d, p1, p2):
    if d == 0:
        return None

    sx = (2*p1[0] + p2[0]) / 3
    sy = (2*p1[1] + p2[1]) / 3
    tx = (p1[0] + 2*p2[0]) / 3
    ty = (p1[1] + 2*p2[1]) / 3
    ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx
    uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy

    koch(d-1, p1, (sx, sy))
    print("{} {}".format(sx, sy))
    koch(d-1, (sx, sy), (ux, uy))
    print("{} {}".format(ux, uy))
    koch(d-1, (ux, uy), (tx, ty))
    print("{} {}".format(tx, ty))
    koch(d-1, (tx, ty), p2)


print("{} {}".format(p1[0], p1[1]))
koch(n, p1, p2)
print("{} {}".format(p2[0], p2[1]))
 from math import cos, sin, pi n = int(input()) n int(input()) int input() input p1 = (0, 0) p1 (0, 0) 0 0 p2 = (100, 0) p2 (100, 0) 100 0 theta = pi/3 theta pi/3 pi 3 def koch(d, p1, p2):
    if d == 0:
        return None

    sx = (2*p1[0] + p2[0]) / 3
    sy = (2*p1[1] + p2[1]) / 3
    tx = (p1[0] + 2*p2[0]) / 3
    ty = (p1[1] + 2*p2[1]) / 3
    ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx
    uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy

    koch(d-1, p1, (sx, sy))
    print("{} {}".format(sx, sy))
    koch(d-1, (sx, sy), (ux, uy))
    print("{} {}".format(ux, uy))
    koch(d-1, (ux, uy), (tx, ty))
    print("{} {}".format(tx, ty))
    koch(d-1, (tx, ty), p2) koch if d == 0:
        return None

     d == 0 d 0 return None None sx = (2*p1[0] + p2[0]) / 3 sx (2*p1[0] + p2[0]) / 3 2*p1[0] + p2[0] 2*p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 sy = (2*p1[1] + p2[1]) / 3 sy (2*p1[1] + p2[1]) / 3 2*p1[1] + p2[1] 2*p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 tx = (p1[0] + 2*p2[0]) / 3 tx (p1[0] + 2*p2[0]) / 3 p1[0] + 2*p2[0] p1[0] p1 0 2*p2[0] 2 p2[0] p2 0 3 ty = (p1[1] + 2*p2[1]) / 3 ty (p1[1] + 2*p2[1]) / 3 p1[1] + 2*p2[1] p1[1] p1 1 2*p2[1] 2 p2[1] p2 1 3 ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx ux (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx (tx - sx) * cos(theta) - (ty - sy) * sin(theta) (tx - sx) * cos(theta) tx - sx tx sx cos(theta) cos theta (ty - sy) * sin(theta) ty - sy ty sy sin(theta) sin theta sx uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy uy (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy (tx - sx) * sin(theta) + (ty - sy) * cos(theta) (tx - sx) * sin(theta) tx - sx tx sx sin(theta) sin theta (ty - sy) * cos(theta) ty - sy ty sy cos(theta) cos theta sy koch(d-1, p1, (sx, sy)) koch d-1 d 1 p1 (sx, sy) sx sy print("{} {}".format(sx, sy)) print "{} {}".format(sx, sy) "{} {}".format "{} {}" format sx sy koch(d-1, (sx, sy), (ux, uy)) koch d-1 d 1 (sx, sy) sx sy (ux, uy) ux uy print("{} {}".format(ux, uy)) print "{} {}".format(ux, uy) "{} {}".format "{} {}" format ux uy koch(d-1, (ux, uy), (tx, ty)) koch d-1 d 1 (ux, uy) ux uy (tx, ty) tx ty print("{} {}".format(tx, ty)) print "{} {}".format(tx, ty) "{} {}".format "{} {}" format tx ty koch(d-1, (tx, ty), p2) koch d-1 d 1 (tx, ty) tx ty p2 d d p1 p1 p2 p2 print("{} {}".format(p1[0], p1[1])) print "{} {}".format(p1[0], p1[1]) "{} {}".format "{} {}" format p1[0] p1 0 p1[1] p1 1 koch(n, p1, p2) koch n p1 p2 print("{} {}".format(p2[0], p2[1])) print "{} {}".format(p2[0], p2[1]) "{} {}".format "{} {}" format p2[0] p2 0 p2[1] p2 1 theta = pi/3 pi/3 theta def koch(d, p1, p2):
    if d == 0:
        return None

    sx = (2*p1[0] + p2[0]) / 3
    sy = (2*p1[1] + p2[1]) / 3
    tx = (p1[0] + 2*p2[0]) / 3
    ty = (p1[1] + 2*p2[1]) / 3
    ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx
    uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy

    koch(d-1, p1, (sx, sy))
    print("{} {}".format(sx, sy))
    koch(d-1, (sx, sy), (ux, uy))
    print("{} {}".format(ux, uy))
    koch(d-1, (ux, uy), (tx, ty))
    print("{} {}".format(tx, ty))
    koch(d-1, (tx, ty), p2) def koch(d, p1, p2):
    if d == 0:
        return None

    sx = (2*p1[0] + p2[0]) / 3
    sy = (2*p1[1] + p2[1]) / 3
    tx = (p1[0] + 2*p2[0]) / 3
    ty = (p1[1] + 2*p2[1]) / 3
    ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx
    uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy

    koch(d-1, p1, (sx, sy))
    print("{} {}".format(sx, sy))
    koch(d-1, (sx, sy), (ux, uy))
    print("{} {}".format(ux, uy))
    koch(d-1, (ux, uy), (tx, ty))
    print("{} {}".format(tx, ty))
    koch(d-1, (tx, ty), p2) koch n = int(input()) int(input()) n p1 = (0, 0) (0, 0) p1 p2 = (100, 0) (100, 0) p2
from math import cos, sin, pi

n = int(input())

p1 = (0, 0)
p2 = (100, 0)
theta = pi/3


def koch(d, p1, p2):
    if d == 0:
        return None

    sx = (2*p1[0] + p2[0]) / 3
    sy = (2*p1[1] + p2[1]) / 3
    tx = (p1[0] + 2*p2[0]) / 3
    ty = (p1[1] + 2*p2[1]) / 3
    ux = (tx - sx) * cos(theta) - (ty - sy) * sin(theta) + sx
    uy = (tx - sx) * sin(theta) + (ty - sy) * cos(theta) + sy

    koch(d-1, p1, (sx, sy))
    print("{} {}".format(sx, sy))
    koch(d-1, (sx, sy), (ux, uy))
    print("{} {}".format(ux, uy))
    koch(d-1, (ux, uy), (tx, ty))
    print("{} {}".format(tx, ty))
    koch(d-1, (tx, ty), p2)


print("{} {}".format(p1[0], p1[1]))
koch(n, p1, p2)
print("{} {}".format(p2[0], p2[1]))

