import math


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

    s, t, u = [0, 0], [0, 0], [0, 0]
    s[0] = (2 * p1[0] + 1 * p2[0]) / 3
    s[1] = (2 * p1[1] + 1 * p2[1]) / 3
    t[0] = (1 * p1[0] + 2 * p2[0]) / 3
    t[1] = (1 * p1[1] + 2 * p2[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1]

    koch(d-1, p1, s)
    print(" ".join(map(str, s)))
    koch(d-1, s, u)
    print(" ".join(map(str, u)))
    koch(d-1, u, t)
    print(" ".join(map(str, t)))
    koch(d-1, t, p2)

if __name__ == "__main__":
    th = math.radians(60)
    n = int(input())
    a = [0, 0]
    b = [100, 0]

    print(" ".join(map(str, a)))
    koch(n, a, b)
    print(" ".join(map(str, b))) import math math def koch(d, p1, p2):
    if d == 0:
        return

    s, t, u = [0, 0], [0, 0], [0, 0]
    s[0] = (2 * p1[0] + 1 * p2[0]) / 3
    s[1] = (2 * p1[1] + 1 * p2[1]) / 3
    t[0] = (1 * p1[0] + 2 * p2[0]) / 3
    t[1] = (1 * p1[1] + 2 * p2[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1]

    koch(d-1, p1, s)
    print(" ".join(map(str, s)))
    koch(d-1, s, u)
    print(" ".join(map(str, u)))
    koch(d-1, u, t)
    print(" ".join(map(str, t)))
    koch(d-1, t, p2) koch if d == 0:
        return

     d == 0 d 0 return s, t, u = [0, 0], [0, 0], [0, 0] s [0, 0] 0 0 t [0, 0] 0 0 u [0, 0] 0 0 s[0] = (2 * p1[0] + 1 * p2[0]) / 3 s[0] s 0 (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 s[1] = (2 * p1[1] + 1 * p2[1]) / 3 s[1] s 1 (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 t[0] = (1 * p1[0] + 2 * p2[0]) / 3 t[0] t 0 (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 t[1] = (1 * p1[1] + 2 * p2[1]) / 3 t[1] t 1 (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 u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0] u[0] u 0 (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0] (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) (t[0] - s[0]) * math.cos(th) t[0] - s[0] t[0] t 0 s[0] s 0 math.cos(th) math.cos math cos th (t[1] - s[1]) * math.sin(th) t[1] - s[1] t[1] t 1 s[1] s 1 math.sin(th) math.sin math sin th s[0] s 0 u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1] u[1] u 1 (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1] (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) (t[0] - s[0]) * math.sin(th) t[0] - s[0] t[0] t 0 s[0] s 0 math.sin(th) math.sin math sin th (t[1] - s[1]) * math.cos(th) t[1] - s[1] t[1] t 1 s[1] s 1 math.cos(th) math.cos math cos th s[1] s 1 koch(d-1, p1, s) koch d-1 d 1 p1 s print(" ".join(map(str, s))) print " ".join(map(str, s)) " ".join " " join map(str, s) map str s koch(d-1, s, u) koch d-1 d 1 s u print(" ".join(map(str, u))) print " ".join(map(str, u)) " ".join " " join map(str, u) map str u koch(d-1, u, t) koch d-1 d 1 u t print(" ".join(map(str, t))) print " ".join(map(str, t)) " ".join " " join map(str, t) map str t koch(d-1, t, p2) koch d-1 d 1 t p2 d d p1 p1 p2 p2 if __name__ == "__main__":
    th = math.radians(60)
    n = int(input())
    a = [0, 0]
    b = [100, 0]

    print(" ".join(map(str, a)))
    koch(n, a, b)
    print(" ".join(map(str, b))) __name__ == "__main__" __name__ "__main__" th = math.radians(60) th math.radians(60) math.radians math radians 60 n = int(input()) n int(input()) int input() input a = [0, 0] a [0, 0] 0 0 b = [100, 0] b [100, 0] 100 0 print(" ".join(map(str, a))) print " ".join(map(str, a)) " ".join " " join map(str, a) map str a koch(n, a, b) koch n a b print(" ".join(map(str, b))) print " ".join(map(str, b)) " ".join " " join map(str, b) map str b th = math.radians(60) math.radians(60) th n = int(input()) int(input()) n b = [100, 0] [100, 0] b a = [0, 0] [0, 0] a def koch(d, p1, p2):
    if d == 0:
        return

    s, t, u = [0, 0], [0, 0], [0, 0]
    s[0] = (2 * p1[0] + 1 * p2[0]) / 3
    s[1] = (2 * p1[1] + 1 * p2[1]) / 3
    t[0] = (1 * p1[0] + 2 * p2[0]) / 3
    t[1] = (1 * p1[1] + 2 * p2[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1]

    koch(d-1, p1, s)
    print(" ".join(map(str, s)))
    koch(d-1, s, u)
    print(" ".join(map(str, u)))
    koch(d-1, u, t)
    print(" ".join(map(str, t)))
    koch(d-1, t, p2) def koch(d, p1, p2):
    if d == 0:
        return

    s, t, u = [0, 0], [0, 0], [0, 0]
    s[0] = (2 * p1[0] + 1 * p2[0]) / 3
    s[1] = (2 * p1[1] + 1 * p2[1]) / 3
    t[0] = (1 * p1[0] + 2 * p2[0]) / 3
    t[1] = (1 * p1[1] + 2 * p2[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1]

    koch(d-1, p1, s)
    print(" ".join(map(str, s)))
    koch(d-1, s, u)
    print(" ".join(map(str, u)))
    koch(d-1, u, t)
    print(" ".join(map(str, t)))
    koch(d-1, t, p2) koch
import math


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

    s, t, u = [0, 0], [0, 0], [0, 0]
    s[0] = (2 * p1[0] + 1 * p2[0]) / 3
    s[1] = (2 * p1[1] + 1 * p2[1]) / 3
    t[0] = (1 * p1[0] + 2 * p2[0]) / 3
    t[1] = (1 * p1[1] + 2 * p2[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(th) - (t[1] - s[1]) * math.sin(th) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(th) + (t[1] - s[1]) * math.cos(th) + s[1]

    koch(d-1, p1, s)
    print(" ".join(map(str, s)))
    koch(d-1, s, u)
    print(" ".join(map(str, u)))
    koch(d-1, u, t)
    print(" ".join(map(str, t)))
    koch(d-1, t, p2)

if __name__ == "__main__":
    th = math.radians(60)
    n = int(input())
    a = [0, 0]
    b = [100, 0]

    print(" ".join(map(str, a)))
    koch(n, a, b)
    print(" ".join(map(str, b)))