# ALDS1_5_C
import math

n = int(input())
def koch(d, p1, p2):
    if d == 0:
        return
    s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3]
    t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3]
    u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]]

    koch(d-1, p1, s)
    print(*s)
    koch(d-1, s, u)
    print(*u)
    koch(d-1, u, t)
    print(*t)
    koch(d-1, t, p2)

print(0.0, 0.0)
koch(n, [0, 0], [100, 0])
print(100.0, 0.0) import math math n = int(input()) n int(input()) int input() input def koch(d, p1, p2):
    if d == 0:
        return
    s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3]
    t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3]
    u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]]

    koch(d-1, p1, s)
    print(*s)
    koch(d-1, s, u)
    print(*u)
    koch(d-1, u, t)
    print(*t)
    koch(d-1, t, p2) koch if d == 0:
        return
     d == 0 d 0 return s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3] s [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3] (2 * p1[0] + p2[0]) / 3 2 * p1[0] + p2[0] 2 * p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 (2 * p1[1] + p2[1]) / 3 2 * p1[1] + p2[1] 2 * p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3] t [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3] (p1[0] + 2 * p2[0]) / 3 p1[0] + 2 * p2[0] p1[0] p1 0 2 * p2[0] 2 p2[0] p2 0 3 (p1[1] + 2 * p2[1]) / 3 p1[1] + 2 * p2[1] p1[1] p1 1 2 * p2[1] 2 p2[1] p2 1 3 u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]] u [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]] (t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0] (t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 (t[0] - s[0]) * 0.5 t[0] - s[0] t[0] t 0 s[0] s 0 0.5 (t[1] - s[1]) * 0.866025403 t[1] - s[1] t[1] t 1 s[1] s 1 0.866025403 s[0] s 0 (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1] (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 (t[0] - s[0]) * 0.866025403 t[0] - s[0] t[0] t 0 s[0] s 0 0.866025403 (t[1] - s[1]) * 0.5 t[1] - s[1] t[1] t 1 s[1] s 1 0.5 s[1] s 1 koch(d-1, p1, s) koch d-1 d 1 p1 s print(*s) print *s s koch(d-1, s, u) koch d-1 d 1 s u print(*u) print *u u koch(d-1, u, t) koch d-1 d 1 u t print(*t) print *t t koch(d-1, t, p2) koch d-1 d 1 t p2 d d p1 p1 p2 p2 print(0.0, 0.0) print 0.0 0.0 koch(n, [0, 0], [100, 0]) koch n [0, 0] 0 0 [100, 0] 100 0 print(100.0, 0.0) print 100.0 0.0 n = int(input()) int(input()) n def koch(d, p1, p2):
    if d == 0:
        return
    s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3]
    t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3]
    u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]]

    koch(d-1, p1, s)
    print(*s)
    koch(d-1, s, u)
    print(*u)
    koch(d-1, u, t)
    print(*t)
    koch(d-1, t, p2) def koch(d, p1, p2):
    if d == 0:
        return
    s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3]
    t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3]
    u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]]

    koch(d-1, p1, s)
    print(*s)
    koch(d-1, s, u)
    print(*u)
    koch(d-1, u, t)
    print(*t)
    koch(d-1, t, p2) koch
# ALDS1_5_C
import math

n = int(input())
def koch(d, p1, p2):
    if d == 0:
        return
    s = [(2 * p1[0] + p2[0]) / 3, (2 * p1[1] + p2[1]) / 3]
    t = [(p1[0] + 2 * p2[0]) / 3, (p1[1] + 2 * p2[1]) / 3]
    u = [(t[0] - s[0]) * 0.5 - (t[1] - s[1]) * 0.866025403 + s[0],
        (t[0] - s[0]) * 0.866025403 + (t[1] - s[1]) * 0.5 + s[1]]

    koch(d-1, p1, s)
    print(*s)
    koch(d-1, s, u)
    print(*u)
    koch(d-1, u, t)
    print(*t)
    koch(d-1, t, p2)

print(0.0, 0.0)
koch(n, [0, 0], [100, 0])
print(100.0, 0.0)
