def next_koch(n):
    turn60 = 0.5 + 3 ** 0.5 * 0.5j
    n_next = [n[0]]
    for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
    return n_next

p1 = 0 + 0j
p2 = 100 + 0j
koch = [p1, p2]

n = int(input())
for i in range(n):
    koch = next_koch(koch)

for z in koch:
    print("{:.8f} {:.8f}".format(z.real, z.imag)) def next_koch(n):
    turn60 = 0.5 + 3 ** 0.5 * 0.5j
    n_next = [n[0]]
    for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
    return n_next next_koch turn60 = 0.5 + 3 ** 0.5 * 0.5j turn60 0.5 + 3 ** 0.5 * 0.5j 0.5 3 ** 0.5 * 0.5j 3 ** 0.5 3 0.5 0.5j n_next = [n[0]] n_next [n[0]] n[0] n 0 for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
     i range(1, len(n)) range 1 len(n) len n s = (n[i - 1] * 2 + n[i]) / 3 s (n[i - 1] * 2 + n[i]) / 3 n[i - 1] * 2 + n[i] n[i - 1] * 2 n[i - 1] n i - 1 i 1 2 n[i] n i 3 t = (n[i - 1] + n[i] * 2) / 3 t (n[i - 1] + n[i] * 2) / 3 n[i - 1] + n[i] * 2 n[i - 1] n i - 1 i 1 n[i] * 2 n[i] n i 2 3 u = (t - s) * turn60 + s u (t - s) * turn60 + s (t - s) * turn60 t - s t s turn60 s n_next +=[s, u, t, n[i]] n_next [s, u, t, n[i]] s u t n[i] n i return n_next n_next n n p1 = 0 + 0j p1 0 + 0j 0 0j p2 = 100 + 0j p2 100 + 0j 100 0j koch = [p1, p2] koch [p1, p2] p1 p2 n = int(input()) n int(input()) int input() input for i in range(n):
    koch = next_koch(koch) i range(n) range n koch = next_koch(koch) koch next_koch(koch) next_koch koch for z in koch:
    print("{:.8f} {:.8f}".format(z.real, z.imag)) z koch print("{:.8f} {:.8f}".format(z.real, z.imag)) print "{:.8f} {:.8f}".format(z.real, z.imag) "{:.8f} {:.8f}".format "{:.8f} {:.8f}" format z.real z real z.imag z imag p1 = 0 + 0j 0 + 0j p1 p2 = 100 + 0j 100 + 0j p2 koch = [p1, p2] [p1, p2] koch def next_koch(n):
    turn60 = 0.5 + 3 ** 0.5 * 0.5j
    n_next = [n[0]]
    for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
    return n_next def next_koch(n):
    turn60 = 0.5 + 3 ** 0.5 * 0.5j
    n_next = [n[0]]
    for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
    return n_next next_koch koch = next_koch(koch) next_koch(koch) koch n = int(input()) int(input()) n
def next_koch(n):
    turn60 = 0.5 + 3 ** 0.5 * 0.5j
    n_next = [n[0]]
    for i in range(1, len(n)):
        s = (n[i - 1] * 2 + n[i]) / 3
        t = (n[i - 1] + n[i] * 2) / 3
        u = (t - s) * turn60 + s
        n_next +=[s, u, t, n[i]]
    return n_next

p1 = 0 + 0j
p2 = 100 + 0j
koch = [p1, p2]

n = int(input())
for i in range(n):
    koch = next_koch(koch)

for z in koch:
    print("{:.8f} {:.8f}".format(z.real, z.imag))