import math

n = int(input())
theta = math.pi / 3
p1 = [0, 0]
p2 = [100, 0]


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

    sx = (2*p1[0] + p2[0]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    s = [sx, sy]
    t = [tx, ty]

    ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx
    uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy
    u = [ux, uy]

    kock(d - 1, p1, s)
    print("{0:.8f} {1:.8f}".format(*s))
    kock(d - 1, s, u)
    print("{0:.8f} {1:.8f}".format(*u))
    kock(d -1 ,u, t)
    print("{0:.08f} {1:.8f}".format(*t))
    kock(d - 1, t, p2)

if __name__ == '__main__':
    print("0.00000000 0.00000000")
    kock(n, p1, p2)
    print("100.00000000 0.00000000") import math math n = int(input()) n int(input()) int input() input theta = math.pi / 3 theta math.pi / 3 math.pi math pi 3 p1 = [0, 0] p1 [0, 0] 0 0 p2 = [100, 0] p2 [100, 0] 100 0 def kock(d, p1, p2):
    if d == 0:
        return

    sx = (2*p1[0] + p2[0]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    s = [sx, sy]
    t = [tx, ty]

    ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx
    uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy
    u = [ux, uy]

    kock(d - 1, p1, s)
    print("{0:.8f} {1:.8f}".format(*s))
    kock(d - 1, s, u)
    print("{0:.8f} {1:.8f}".format(*u))
    kock(d -1 ,u, t)
    print("{0:.08f} {1:.8f}".format(*t))
    kock(d - 1, t, p2) kock if d == 0:
        return

     d == 0 d 0 return 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 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 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 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 s = [sx, sy] s [sx, sy] sx sy t = [tx, ty] t [tx, ty] tx ty ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx ux (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) (t[0] - s[0]) * math.cos(theta) t[0] - s[0] t[0] t 0 s[0] s 0 math.cos(theta) math.cos math cos theta (t[1] - s[1]) * math.sin(theta) t[1] - s[1] t[1] t 1 s[1] s 1 math.sin(theta) math.sin math sin theta sx uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy uy (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) (t[1] - s[1]) * math.cos(theta) t[1] - s[1] t[1] t 1 s[1] s 1 math.cos(theta) math.cos math cos theta (t[0] - s[0]) * math.sin(theta) t[0] - s[0] t[0] t 0 s[0] s 0 math.sin(theta) math.sin math sin theta sy u = [ux, uy] u [ux, uy] ux uy kock(d - 1, p1, s) kock d - 1 d 1 p1 s print("{0:.8f} {1:.8f}".format(*s)) print "{0:.8f} {1:.8f}".format(*s) "{0:.8f} {1:.8f}".format "{0:.8f} {1:.8f}" format *s s kock(d - 1, s, u) kock d - 1 d 1 s u print("{0:.8f} {1:.8f}".format(*u)) print "{0:.8f} {1:.8f}".format(*u) "{0:.8f} {1:.8f}".format "{0:.8f} {1:.8f}" format *u u kock(d -1 ,u, t) kock d -1 d 1 u t print("{0:.08f} {1:.8f}".format(*t)) print "{0:.08f} {1:.8f}".format(*t) "{0:.08f} {1:.8f}".format "{0:.08f} {1:.8f}" format *t t kock(d - 1, t, p2) kock d - 1 d 1 t p2 d d p1 p1 p2 p2 if __name__ == '__main__':
    print("0.00000000 0.00000000")
    kock(n, p1, p2)
    print("100.00000000 0.00000000") __name__ == '__main__' __name__ '__main__' print("0.00000000 0.00000000") print "0.00000000 0.00000000" kock(n, p1, p2) kock n p1 p2 print("100.00000000 0.00000000") print "100.00000000 0.00000000" p2 = [100, 0] [100, 0] p2 n = int(input()) int(input()) n p1 = [0, 0] [0, 0] p1 def kock(d, p1, p2):
    if d == 0:
        return

    sx = (2*p1[0] + p2[0]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    s = [sx, sy]
    t = [tx, ty]

    ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx
    uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy
    u = [ux, uy]

    kock(d - 1, p1, s)
    print("{0:.8f} {1:.8f}".format(*s))
    kock(d - 1, s, u)
    print("{0:.8f} {1:.8f}".format(*u))
    kock(d -1 ,u, t)
    print("{0:.08f} {1:.8f}".format(*t))
    kock(d - 1, t, p2) def kock(d, p1, p2):
    if d == 0:
        return

    sx = (2*p1[0] + p2[0]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    s = [sx, sy]
    t = [tx, ty]

    ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx
    uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy
    u = [ux, uy]

    kock(d - 1, p1, s)
    print("{0:.8f} {1:.8f}".format(*s))
    kock(d - 1, s, u)
    print("{0:.8f} {1:.8f}".format(*u))
    kock(d -1 ,u, t)
    print("{0:.08f} {1:.8f}".format(*t))
    kock(d - 1, t, p2) kock theta = math.pi / 3 math.pi / 3 theta
import math

n = int(input())
theta = math.pi / 3
p1 = [0, 0]
p2 = [100, 0]


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

    sx = (2*p1[0] + p2[0]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    s = [sx, sy]
    t = [tx, ty]

    ux = (t[0] - s[0]) * math.cos(theta) - (t[1] - s[1]) * math.sin(theta) + sx
    uy = (t[1] - s[1]) * math.cos(theta) + (t[0] - s[0]) * math.sin(theta) + sy
    u = [ux, uy]

    kock(d - 1, p1, s)
    print("{0:.8f} {1:.8f}".format(*s))
    kock(d - 1, s, u)
    print("{0:.8f} {1:.8f}".format(*u))
    kock(d -1 ,u, t)
    print("{0:.08f} {1:.8f}".format(*t))
    kock(d - 1, t, p2)

if __name__ == '__main__':
    print("0.00000000 0.00000000")
    kock(n, p1, p2)
    print("100.00000000 0.00000000")