# -*- coding:utf-8 -*-
import math


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

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

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

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

    koch(n - 1, p1, s)
    print(s[0], s[1])

    koch(n - 1, s, u)
    print(u[0], u[1])

    koch(n - 1, u, t)
    print(t[0], t[1])

    koch(n - 1, t, p2)


if __name__ == "__main__":
    n = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1]) import math math def koch(n, p1, p2):
    if n == 0:
        return

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

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

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

    koch(n - 1, p1, s)
    print(s[0], s[1])

    koch(n - 1, s, u)
    print(u[0], u[1])

    koch(n - 1, u, t)
    print(t[0], t[1])

    koch(n - 1, t, p2) koch if n == 0:
        return

     n == 0 n 0 return sx = (2 * p1[0] + 1 * p2[0]) / 3 sx (2 * p1[0] + 1 * p2[0]) / 3 2 * p1[0] + 1 * p2[0] 2 * p1[0] 2 p1[0] p1 0 1 * p2[0] 1 p2[0] p2 0 3 sy = (2 * p1[1] + 1 * p2[1]) / 3 sy (2 * p1[1] + 1 * p2[1]) / 3 2 * p1[1] + 1 * p2[1] 2 * p1[1] 2 p1[1] p1 1 1 * p2[1] 1 p2[1] p2 1 3 s = (sx, sy) s (sx, sy) sx sy tx = (1 * p1[0] + 2 * p2[0]) / 3 tx (1 * p1[0] + 2 * p2[0]) / 3 1 * p1[0] + 2 * p2[0] 1 * p1[0] 1 p1[0] p1 0 2 * p2[0] 2 p2[0] p2 0 3 ty = (1 * p1[1] + 2 * p2[1]) / 3 ty (1 * p1[1] + 2 * p2[1]) / 3 1 * p1[1] + 2 * p2[1] 1 * p1[1] 1 p1[1] p1 1 2 * p2[1] 2 p2[1] p2 1 3 t = (tx, ty) t (tx, ty) tx ty rad60 = math.radians(60) rad60 math.radians(60) math.radians math radians 60 ux = (tx - sx) * math.cos(rad60) - (ty - sy) * math.sin(rad60) + sx ux (tx - sx) * math.cos(rad60) - (ty - sy) * math.sin(rad60) + sx (tx - sx) * math.cos(rad60) - (ty - sy) * math.sin(rad60) (tx - sx) * math.cos(rad60) tx - sx tx sx math.cos(rad60) math.cos math cos rad60 (ty - sy) * math.sin(rad60) ty - sy ty sy math.sin(rad60) math.sin math sin rad60 sx uy = (tx - sx) * math.sin(rad60) + (ty - sy) * math.cos(rad60) + sy uy (tx - sx) * math.sin(rad60) + (ty - sy) * math.cos(rad60) + sy (tx - sx) * math.sin(rad60) + (ty - sy) * math.cos(rad60) (tx - sx) * math.sin(rad60) tx - sx tx sx math.sin(rad60) math.sin math sin rad60 (ty - sy) * math.cos(rad60) ty - sy ty sy math.cos(rad60) math.cos math cos rad60 sy u = (ux, uy) u (ux, uy) ux uy koch(n - 1, p1, s) koch n - 1 n 1 p1 s print(s[0], s[1]) print s[0] s 0 s[1] s 1 koch(n - 1, s, u) koch n - 1 n 1 s u print(u[0], u[1]) print u[0] u 0 u[1] u 1 koch(n - 1, u, t) koch n - 1 n 1 u t print(t[0], t[1]) print t[0] t 0 t[1] t 1 koch(n - 1, t, p2) koch n - 1 n 1 t p2 n n p1 p1 p2 p2 if __name__ == "__main__":
    n = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1]) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input p1 = (0.0, 0.0) p1 (0.0, 0.0) 0.0 0.0 p2 = (100.0, 0.0) p2 (100.0, 0.0) 100.0 0.0 print(p1[0], p1[1]) print p1[0] p1 0 p1[1] p1 1 koch(n, p1, p2) koch n p1 p2 print(p2[0], p2[1]) print p2[0] p2 0 p2[1] p2 1 p1 = (0.0, 0.0) (0.0, 0.0) p1 def koch(n, p1, p2):
    if n == 0:
        return

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

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

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

    koch(n - 1, p1, s)
    print(s[0], s[1])

    koch(n - 1, s, u)
    print(u[0], u[1])

    koch(n - 1, u, t)
    print(t[0], t[1])

    koch(n - 1, t, p2) def koch(n, p1, p2):
    if n == 0:
        return

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

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

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

    koch(n - 1, p1, s)
    print(s[0], s[1])

    koch(n - 1, s, u)
    print(u[0], u[1])

    koch(n - 1, u, t)
    print(t[0], t[1])

    koch(n - 1, t, p2) koch p2 = (100.0, 0.0) (100.0, 0.0) p2 n = int(input()) int(input()) n
# -*- coding:utf-8 -*-
import math


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

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

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

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

    koch(n - 1, p1, s)
    print(s[0], s[1])

    koch(n - 1, s, u)
    print(u[0], u[1])

    koch(n - 1, u, t)
    print(t[0], t[1])

    koch(n - 1, t, p2)


if __name__ == "__main__":
    n = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1])