import math

x = 0
y = 1
p1 = (0, 0)
p2 = (100, 0)
sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))

n = int(input())

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

    # p1, p2 から s, t, u を計算
    s = (0, 0)
    t = (0, 0)
    u = (0, 0)
    s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3)
    t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3)
    u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y])

    kock(n-1, p1, s)
    print ('{:.8f} {:.8f}'.format(s[x], s[y]))
    kock(n-1, s, u)
    print ('{:.8f} {:.8f}'.format(u[x], u[y]))
    kock(n-1, u, t)
    print ('{:.8f} {:.8f}'.format(t[x], t[y]))
    kock(n-1, t, p2)


print ('{:.8f} {:.8f}'.format(p1[x], p1[y]))
kock(n, p1, p2)
print ('{:.8f} {:.8f}'.format(p2[x], p2[y])) import math math x = 0 x 0 y = 1 y 1 p1 = (0, 0) p1 (0, 0) 0 0 p2 = (100, 0) p2 (100, 0) 100 0 sin60 = math.sin(math.radians(60)) sin60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 cos60 = math.cos(math.radians(60)) cos60 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 n = int(input()) n int(input()) int input() input def kock(n, p1, p2):
    if n == 0:
        return

    # p1, p2 から s, t, u を計算
    s = (0, 0)
    t = (0, 0)
    u = (0, 0)
    s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3)
    t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3)
    u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y])

    kock(n-1, p1, s)
    print ('{:.8f} {:.8f}'.format(s[x], s[y]))
    kock(n-1, s, u)
    print ('{:.8f} {:.8f}'.format(u[x], u[y]))
    kock(n-1, u, t)
    print ('{:.8f} {:.8f}'.format(t[x], t[y]))
    kock(n-1, t, p2) kock if n == 0:
        return

    # p1, p2 から s, t, u を計算
     n == 0 n 0 return s = (0, 0) s (0, 0) 0 0 t = (0, 0) t (0, 0) 0 0 u = (0, 0) u (0, 0) 0 0 s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3) s ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3) (2 * p1[x] + 1 * p2[x]) / 3 2 * p1[x] + 1 * p2[x] 2 * p1[x] 2 p1[x] p1 x 1 * p2[x] 1 p2[x] p2 x 3 (2 * p1[y] + 1 * p2[y]) / 3 2 * p1[y] + 1 * p2[y] 2 * p1[y] 2 p1[y] p1 y 1 * p2[y] 1 p2[y] p2 y 3 t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3) t ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3) (1 * p1[x] + 2 * p2[x]) / 3 1 * p1[x] + 2 * p2[x] 1 * p1[x] 1 p1[x] p1 x 2 * p2[x] 2 p2[x] p2 x 3 (1 * p1[y] + 2 * p2[y]) / 3 1 * p1[y] + 2 * p2[y] 1 * p1[y] 1 p1[y] p1 y 2 * p2[y] 2 p2[y] p2 y 3 u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y]) u ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y]) (t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x] (t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 (t[x] - s[x])*cos60 t[x] - s[x] t[x] t x s[x] s x cos60 (t[y] - s[y])*sin60 t[y] - s[y] t[y] t y s[y] s y sin60 s[x] s x (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y] (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 (t[x] - s[x])*sin60 t[x] - s[x] t[x] t x s[x] s x sin60 (t[y] - s[y])*cos60 t[y] - s[y] t[y] t y s[y] s y cos60 s[y] s y kock(n-1, p1, s) kock n-1 n 1 p1 s print ('{:.8f} {:.8f}'.format(s[x], s[y])) print '{:.8f} {:.8f}'.format(s[x], s[y]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format s[x] s x s[y] s y kock(n-1, s, u) kock n-1 n 1 s u print ('{:.8f} {:.8f}'.format(u[x], u[y])) print '{:.8f} {:.8f}'.format(u[x], u[y]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format u[x] u x u[y] u y kock(n-1, u, t) kock n-1 n 1 u t print ('{:.8f} {:.8f}'.format(t[x], t[y])) print '{:.8f} {:.8f}'.format(t[x], t[y]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format t[x] t x t[y] t y kock(n-1, t, p2) kock n-1 n 1 t p2 n n p1 p1 p2 p2 print ('{:.8f} {:.8f}'.format(p1[x], p1[y])) print '{:.8f} {:.8f}'.format(p1[x], p1[y]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format p1[x] p1 x p1[y] p1 y kock(n, p1, p2) kock n p1 p2 print ('{:.8f} {:.8f}'.format(p2[x], p2[y])) print '{:.8f} {:.8f}'.format(p2[x], p2[y]) '{:.8f} {:.8f}'.format '{:.8f} {:.8f}' format p2[x] p2 x p2[y] p2 y p1 = (0, 0) (0, 0) p1 cos60 = math.cos(math.radians(60)) math.cos(math.radians(60)) cos60 p2 = (100, 0) (100, 0) p2 def kock(n, p1, p2):
    if n == 0:
        return

    # p1, p2 から s, t, u を計算
    s = (0, 0)
    t = (0, 0)
    u = (0, 0)
    s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3)
    t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3)
    u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y])

    kock(n-1, p1, s)
    print ('{:.8f} {:.8f}'.format(s[x], s[y]))
    kock(n-1, s, u)
    print ('{:.8f} {:.8f}'.format(u[x], u[y]))
    kock(n-1, u, t)
    print ('{:.8f} {:.8f}'.format(t[x], t[y]))
    kock(n-1, t, p2) def kock(n, p1, p2):
    if n == 0:
        return

    # p1, p2 から s, t, u を計算
    s = (0, 0)
    t = (0, 0)
    u = (0, 0)
    s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3)
    t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3)
    u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y])

    kock(n-1, p1, s)
    print ('{:.8f} {:.8f}'.format(s[x], s[y]))
    kock(n-1, s, u)
    print ('{:.8f} {:.8f}'.format(u[x], u[y]))
    kock(n-1, u, t)
    print ('{:.8f} {:.8f}'.format(t[x], t[y]))
    kock(n-1, t, p2) kock x = 0 0 x sin60 = math.sin(math.radians(60)) math.sin(math.radians(60)) sin60 n = int(input()) int(input()) n y = 1 1 y
import math

x = 0
y = 1
p1 = (0, 0)
p2 = (100, 0)
sin60 = math.sin(math.radians(60))
cos60 = math.cos(math.radians(60))

n = int(input())

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

    # p1, p2 から s, t, u を計算
    s = (0, 0)
    t = (0, 0)
    u = (0, 0)
    s = ((2 * p1[x] + 1 * p2[x]) / 3, (2 * p1[y] + 1 * p2[y]) / 3)
    t = ((1 * p1[x] + 2 * p2[x]) / 3, (1 * p1[y] + 2 * p2[y]) / 3)
    u = ((t[x] - s[x])*cos60 - (t[y] - s[y])*sin60 + s[x], (t[x] - s[x])*sin60 + (t[y] - s[y])*cos60 + s[y])

    kock(n-1, p1, s)
    print ('{:.8f} {:.8f}'.format(s[x], s[y]))
    kock(n-1, s, u)
    print ('{:.8f} {:.8f}'.format(u[x], u[y]))
    kock(n-1, u, t)
    print ('{:.8f} {:.8f}'.format(t[x], t[y]))
    kock(n-1, t, p2)


print ('{:.8f} {:.8f}'.format(p1[x], p1[y]))
kock(n, p1, p2)
print ('{:.8f} {:.8f}'.format(p2[x], p2[y]))
