import math

n = int(input())
a = [0, 0]
b = [100, 0]
root3 = math.sqrt(3)


def koch(a, b, n):
    if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1)


print(*a)
koch(a, b, n)
if n == 0:
    print(*b)
 import math math 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 root3 = math.sqrt(3) root3 math.sqrt(3) math.sqrt math sqrt 3 def koch(a, b, n):
    if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1) koch if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1) n == 1 n 1 s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3] s [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3] (a[0] * 2 + b[0]) / 3 a[0] * 2 + b[0] a[0] * 2 a[0] a 0 2 b[0] b 0 3 (a[1] * 2 + b[1]) / 3 a[1] * 2 + b[1] a[1] * 2 a[1] a 1 2 b[1] b 1 3 t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3] t [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3] (a[0] + b[0] * 2) / 3 a[0] + b[0] * 2 a[0] a 0 b[0] * 2 b[0] b 0 2 3 (a[1] + b[1] * 2) / 3 a[1] + b[1] * 2 a[1] a 1 b[1] * 2 b[1] b 1 2 3 u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2] u [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2] (s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2 s[0] + t[0] - root3 * t[1] + root3 * s[1] s[0] + t[0] - root3 * t[1] s[0] + t[0] s[0] s 0 t[0] t 0 root3 * t[1] root3 t[1] t 1 root3 * s[1] root3 s[1] s 1 2 (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2 s[1] + t[1] + root3 * t[0] - root3 * s[0] s[1] + t[1] + root3 * t[0] s[1] + t[1] s[1] s 1 t[1] t 1 root3 * t[0] root3 t[0] t 0 root3 * s[0] root3 s[0] s 0 2 print(*s) print *s s print(*u) print *u u print(*t) print *t t print(*b) print *b b elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1) n > 1 n 1 s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3] s [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3] (a[0] * 2 + b[0]) / 3 a[0] * 2 + b[0] a[0] * 2 a[0] a 0 2 b[0] b 0 3 (a[1] * 2 + b[1]) / 3 a[1] * 2 + b[1] a[1] * 2 a[1] a 1 2 b[1] b 1 3 t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3] t [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3] (a[0] + b[0] * 2) / 3 a[0] + b[0] * 2 a[0] a 0 b[0] * 2 b[0] b 0 2 3 (a[1] + b[1] * 2) / 3 a[1] + b[1] * 2 a[1] a 1 b[1] * 2 b[1] b 1 2 3 u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2] u [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2] (s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2 s[0] + t[0] - root3 * t[1] + root3 * s[1] s[0] + t[0] - root3 * t[1] s[0] + t[0] s[0] s 0 t[0] t 0 root3 * t[1] root3 t[1] t 1 root3 * s[1] root3 s[1] s 1 2 (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2 s[1] + t[1] + root3 * t[0] - root3 * s[0] s[1] + t[1] + root3 * t[0] s[1] + t[1] s[1] s 1 t[1] t 1 root3 * t[0] root3 t[0] t 0 root3 * s[0] root3 s[0] s 0 2 koch(a, s, n-1) koch a s n-1 n 1 koch(s, u, n-1) koch s u n-1 n 1 koch(u, t, n-1) koch u t n-1 n 1 koch(t, b, n-1) koch t b n-1 n 1 a a b b n n print(*a) print *a a koch(a, b, n) koch a b n if n == 0:
    print(*b) n == 0 n 0 print(*b) print *b b b = [100, 0] [100, 0] b root3 = math.sqrt(3) math.sqrt(3) root3 a = [0, 0] [0, 0] a def koch(a, b, n):
    if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1) def koch(a, b, n):
    if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1) koch n = int(input()) int(input()) n
import math

n = int(input())
a = [0, 0]
b = [100, 0]
root3 = math.sqrt(3)


def koch(a, b, n):
    if n == 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        print(*s)
        print(*u)
        print(*t)
        print(*b)

    elif n > 1:
        s = [(a[0] * 2 + b[0]) / 3, (a[1] * 2 + b[1]) / 3]
        t = [(a[0] + b[0] * 2) / 3, (a[1] + b[1] * 2) / 3]
        u = [(s[0] + t[0] - root3 * t[1] + root3 * s[1]) / 2,
             (s[1] + t[1] + root3 * t[0] - root3 * s[0]) / 2]
        koch(a, s, n-1)
        koch(s, u, n-1)
        koch(u, t, n-1)
        koch(t, b, n-1)


print(*a)
koch(a, b, n)
if n == 0:
    print(*b)

