from math import sin, cos, radians

N = int(input())

p1 = (0, 0)
p2 = (100, 0)
th = radians(60)

def koch(n, a, b):
    global th

    if n == 0:
        return
    
    s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3)
    t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3)
    u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1])

    koch(n - 1, a, s)
    print(*s)
    koch(n - 1, s, u)
    print(*u)
    koch(n - 1, u, t)
    print(*t)
    koch(n - 1, t, b)

print(*p1)
koch(N, p1, p2)
print(*p2) from math import sin, cos, radians N = int(input()) N int(input()) int input() input p1 = (0, 0) p1 (0, 0) 0 0 p2 = (100, 0) p2 (100, 0) 100 0 th = radians(60) th radians(60) radians 60 def koch(n, a, b):
    global th

    if n == 0:
        return
    
    s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3)
    t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3)
    u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1])

    koch(n - 1, a, s)
    print(*s)
    koch(n - 1, s, u)
    print(*u)
    koch(n - 1, u, t)
    print(*t)
    koch(n - 1, t, b) koch global th if n == 0:
        return
    
     n == 0 n 0 return s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3) s ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3) (2 * a[0] + 1 * b[0]) / 3 2 * a[0] + 1 * b[0] 2 * a[0] 2 a[0] a 0 1 * b[0] 1 b[0] b 0 3 (2 * a[1] + 1 * b[1]) / 3 2 * a[1] + 1 * b[1] 2 * a[1] 2 a[1] a 1 1 * b[1] 1 b[1] b 1 3 t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3) t ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3) (1 * a[0] + 2 * b[0]) / 3 1 * a[0] + 2 * b[0] 1 * a[0] 1 a[0] a 0 2 * b[0] 2 b[0] b 0 3 (1 * a[1] + 2 * b[1]) / 3 1 * a[1] + 2 * b[1] 1 * a[1] 1 a[1] a 1 2 * b[1] 2 b[1] b 1 3 u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1]) u ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1]) (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0] (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) (t[0] - s[0]) * cos(th) t[0] - s[0] t[0] t 0 s[0] s 0 cos(th) cos th (t[1] - s[1]) * sin(th) t[1] - s[1] t[1] t 1 s[1] s 1 sin(th) sin th s[0] s 0 (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1] (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) (t[0] - s[0]) * sin(th) t[0] - s[0] t[0] t 0 s[0] s 0 sin(th) sin th (t[1] - s[1]) * cos(th) t[1] - s[1] t[1] t 1 s[1] s 1 cos(th) cos th s[1] s 1 koch(n - 1, a, s) koch n - 1 n 1 a s print(*s) print *s s koch(n - 1, s, u) koch n - 1 n 1 s u print(*u) print *u u koch(n - 1, u, t) koch n - 1 n 1 u t print(*t) print *t t koch(n - 1, t, b) koch n - 1 n 1 t b n n a a b b print(*p1) print *p1 p1 koch(N, p1, p2) koch N p1 p2 print(*p2) print *p2 p2 N = int(input()) int(input()) N th = radians(60) radians(60) th p1 = (0, 0) (0, 0) p1 p2 = (100, 0) (100, 0) p2 def koch(n, a, b):
    global th

    if n == 0:
        return
    
    s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3)
    t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3)
    u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1])

    koch(n - 1, a, s)
    print(*s)
    koch(n - 1, s, u)
    print(*u)
    koch(n - 1, u, t)
    print(*t)
    koch(n - 1, t, b) def koch(n, a, b):
    global th

    if n == 0:
        return
    
    s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3)
    t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3)
    u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1])

    koch(n - 1, a, s)
    print(*s)
    koch(n - 1, s, u)
    print(*u)
    koch(n - 1, u, t)
    print(*t)
    koch(n - 1, t, b) koch
from math import sin, cos, radians

N = int(input())

p1 = (0, 0)
p2 = (100, 0)
th = radians(60)

def koch(n, a, b):
    global th

    if n == 0:
        return
    
    s = ((2 * a[0] + 1 * b[0]) / 3, (2 * a[1] + 1 * b[1]) / 3)
    t = ((1 * a[0] + 2 * b[0]) / 3, (1 * a[1] + 2 * b[1]) / 3)
    u = ((t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0],
         (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1])

    koch(n - 1, a, s)
    print(*s)
    koch(n - 1, s, u)
    print(*u)
    koch(n - 1, u, t)
    print(*t)
    koch(n - 1, t, b)

print(*p1)
koch(N, p1, p2)
print(*p2)
