#初期値
p1 = [0, 0]
p2 = [100, 0]
input_n = int(input())

def kock(n, p1, p2):
    if n == 0: return
    
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    sin60 = (3 ** 0.5) / 2
    cos60 = (1 ** 0.5) / 2

    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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0]
    u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] 

    kock(n-1, p1, s)
    print(f"{s[0]:.8f} {s[1]:.8f}")
    kock(n-1, s, u)
    print(f"{u[0]:.8f} {u[1]:.8f}")
    kock(n-1, u, t)
    print(f"{t[0]:.8f} {t[1]:.8f}")
    kock(n-1, t, p2)

print(f"{p1[0]:.8f} {p1[1]:.8f}")
kock(input_n, p1, p2)
print(f"{p2[0]:.8f} {p2[1]:.8f}")
 p1 = [0, 0] p1 [0, 0] 0 0 p2 = [100, 0] p2 [100, 0] 100 0 input_n = int(input()) input_n int(input()) int input() input def kock(n, p1, p2):
    if n == 0: return
    
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    sin60 = (3 ** 0.5) / 2
    cos60 = (1 ** 0.5) / 2

    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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0]
    u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] 

    kock(n-1, p1, s)
    print(f"{s[0]:.8f} {s[1]:.8f}")
    kock(n-1, s, u)
    print(f"{u[0]:.8f} {u[1]:.8f}")
    kock(n-1, u, t)
    print(f"{t[0]:.8f} {t[1]:.8f}")
    kock(n-1, t, p2) kock if n == 0: return
    
     n == 0 n 0 s = [0, 0] s [0, 0] 0 0 t = [0, 0] t [0, 0] 0 0 u = [0, 0] u [0, 0] 0 0 sin60 = (3 ** 0.5) / 2 sin60 (3 ** 0.5) / 2 3 ** 0.5 3 0.5 2 cos60 = (1 ** 0.5) / 2 cos60 (1 ** 0.5) / 2 1 ** 0.5 1 0.5 2 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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0] u[0] u 0 (((t[0] - s[0]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0] ((t[0] - s[0]) * cos60) - ((t[1] - s[1]) * sin60) (t[0] - s[0]) * cos60 t[0] - s[0] t[0] t 0 s[0] s 0 cos60 (t[1] - s[1]) * sin60 t[1] - s[1] t[1] t 1 s[1] s 1 sin60 s[0] s 0 u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] u[1] u 1 (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] ((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60) (t[0] - s[0]) * sin60 t[0] - s[0] t[0] t 0 s[0] s 0 sin60 (t[1] - s[1]) * cos60 t[1] - s[1] t[1] t 1 s[1] s 1 cos60 s[1] s 1 kock(n-1, p1, s) kock n-1 n 1 p1 s print(f"{s[0]:.8f} {s[1]:.8f}") print f"{s[0]:.8f} {s[1]:.8f}" kock(n-1, s, u) kock n-1 n 1 s u print(f"{u[0]:.8f} {u[1]:.8f}") print f"{u[0]:.8f} {u[1]:.8f}" kock(n-1, u, t) kock n-1 n 1 u t print(f"{t[0]:.8f} {t[1]:.8f}") print f"{t[0]:.8f} {t[1]:.8f}" kock(n-1, t, p2) kock n-1 n 1 t p2 n n p1 p1 p2 p2 print(f"{p1[0]:.8f} {p1[1]:.8f}") print f"{p1[0]:.8f} {p1[1]:.8f}" kock(input_n, p1, p2) kock input_n p1 p2 print(f"{p2[0]:.8f} {p2[1]:.8f}") print f"{p2[0]:.8f} {p2[1]:.8f}" p1 = [0, 0] [0, 0] p1 p2 = [100, 0] [100, 0] p2 def kock(n, p1, p2):
    if n == 0: return
    
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    sin60 = (3 ** 0.5) / 2
    cos60 = (1 ** 0.5) / 2

    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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0]
    u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] 

    kock(n-1, p1, s)
    print(f"{s[0]:.8f} {s[1]:.8f}")
    kock(n-1, s, u)
    print(f"{u[0]:.8f} {u[1]:.8f}")
    kock(n-1, u, t)
    print(f"{t[0]:.8f} {t[1]:.8f}")
    kock(n-1, t, p2) def kock(n, p1, p2):
    if n == 0: return
    
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    sin60 = (3 ** 0.5) / 2
    cos60 = (1 ** 0.5) / 2

    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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0]
    u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] 

    kock(n-1, p1, s)
    print(f"{s[0]:.8f} {s[1]:.8f}")
    kock(n-1, s, u)
    print(f"{u[0]:.8f} {u[1]:.8f}")
    kock(n-1, u, t)
    print(f"{t[0]:.8f} {t[1]:.8f}")
    kock(n-1, t, p2) kock input_n = int(input()) int(input()) input_n
#初期値
p1 = [0, 0]
p2 = [100, 0]
input_n = int(input())

def kock(n, p1, p2):
    if n == 0: return
    
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    sin60 = (3 ** 0.5) / 2
    cos60 = (1 ** 0.5) / 2

    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]) * cos60) - ((t[1] - s[1]) * sin60)) + s[0]
    u[1] = (((t[0] - s[0]) * sin60) + ((t[1] - s[1]) * cos60)) + s[1] 

    kock(n-1, p1, s)
    print(f"{s[0]:.8f} {s[1]:.8f}")
    kock(n-1, s, u)
    print(f"{u[0]:.8f} {u[1]:.8f}")
    kock(n-1, u, t)
    print(f"{t[0]:.8f} {t[1]:.8f}")
    kock(n-1, t, p2)

print(f"{p1[0]:.8f} {p1[1]:.8f}")
kock(input_n, p1, p2)
print(f"{p2[0]:.8f} {p2[1]:.8f}")

