N = int(input())
from math import sin, cos, pi
th = pi/3
def koch(d, p1, p2):
    if d == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    
    s[0] = (2 * p1[0] + p2[0])/3
    s[1] = (2 * p1[1] + p2[1])/3

    t[0] = (2 * p2[0] + p1[0])/3
    t[1] = (2 * p2[1] + p1[1])/3

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

p_start = [0.0, 0.0]
p_end = [100.0, 0.0]
print(*p_start)
koch(N, p_start, p_end)
print(*p_end) N = int(input()) N int(input()) int input() input from math import sin, cos, pi th = pi/3 th pi/3 pi 3 def koch(d, p1, p2):
    if d == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    
    s[0] = (2 * p1[0] + p2[0])/3
    s[1] = (2 * p1[1] + p2[1])/3

    t[0] = (2 * p2[0] + p1[0])/3
    t[1] = (2 * p2[1] + p1[1])/3

    u[0] = (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0]
    u[1] = (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + 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 = [0, 0] s [0, 0] 0 0 t = [0, 0] t [0, 0] 0 0 u = [0, 0] u [0, 0] 0 0 s[0] = (2 * p1[0] + p2[0])/3 s[0] s 0 (2 * p1[0] + p2[0])/3 2 * p1[0] + p2[0] 2 * p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 s[1] = (2 * p1[1] + p2[1])/3 s[1] s 1 (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[0] = (2 * p2[0] + p1[0])/3 t[0] t 0 (2 * p2[0] + p1[0])/3 2 * p2[0] + p1[0] 2 * p2[0] 2 p2[0] p2 0 p1[0] p1 0 3 t[1] = (2 * p2[1] + p1[1])/3 t[1] t 1 (2 * p2[1] + p1[1])/3 2 * p2[1] + p1[1] 2 * p2[1] 2 p2[1] p2 1 p1[1] p1 1 3 u[0] = (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0] u[0] u 0 (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 u[1] = (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + s[1] u[1] u 1 (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(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 p_start = [0.0, 0.0] p_start [0.0, 0.0] 0.0 0.0 p_end = [100.0, 0.0] p_end [100.0, 0.0] 100.0 0.0 print(*p_start) print *p_start p_start koch(N, p_start, p_end) koch N p_start p_end print(*p_end) print *p_end p_end N = int(input()) int(input()) N def koch(d, p1, p2):
    if d == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    
    s[0] = (2 * p1[0] + p2[0])/3
    s[1] = (2 * p1[1] + p2[1])/3

    t[0] = (2 * p2[0] + p1[0])/3
    t[1] = (2 * p2[1] + p1[1])/3

    u[0] = (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0]
    u[1] = (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + 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 = [0, 0]
    t = [0, 0]
    u = [0, 0]
    
    s[0] = (2 * p1[0] + p2[0])/3
    s[1] = (2 * p1[1] + p2[1])/3

    t[0] = (2 * p2[0] + p1[0])/3
    t[1] = (2 * p2[1] + p1[1])/3

    u[0] = (t[0] - s[0]) * cos(th) - (t[1] - s[1]) * sin(th) + s[0]
    u[1] = (t[0] - s[0]) * sin(th) + (t[1] - s[1]) * cos(th) + 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 p_end = [100.0, 0.0] [100.0, 0.0] p_end th = pi/3 pi/3 th p_start = [0.0, 0.0] [0.0, 0.0] p_start
N = int(input())
from math import sin, cos, pi
th = pi/3
def koch(d, p1, p2):
    if d == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    
    s[0] = (2 * p1[0] + p2[0])/3
    s[1] = (2 * p1[1] + p2[1])/3

    t[0] = (2 * p2[0] + p1[0])/3
    t[1] = (2 * p2[1] + p1[1])/3

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

p_start = [0.0, 0.0]
p_end = [100.0, 0.0]
print(*p_start)
koch(N, p_start, p_end)
print(*p_end)
