def koch(n, p1, p2):
    if n == 0:
        return

    s_x = p1[0] * 2/3 + p2[0] * 1/3
    s_y = p1[1] * 2/3 + p2[1] * 1/3

    t_x = p1[0] * 1/3 + p2[0] * 2/3
    t_y = p1[1] * 1/3 + p2[1] * 2/3

    u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x
    u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y

    s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y)
    
    koch(n - 1, p1, s)
    print(' '.join(str(i) for i in s))
    koch(n - 1, s, u)
    print(' '.join(str(i) for i in u))
    koch(n - 1, u, t)
    print(' '.join(str(i) for i in t))
    koch(n - 1, t, p2)
    
    
S, G = (0, 0), (100, 0)
print(' '.join(str(i) for i in S))
koch(int(input()), S, G)
print(' '.join(str(i) for i in G))
 def koch(n, p1, p2):
    if n == 0:
        return

    s_x = p1[0] * 2/3 + p2[0] * 1/3
    s_y = p1[1] * 2/3 + p2[1] * 1/3

    t_x = p1[0] * 1/3 + p2[0] * 2/3
    t_y = p1[1] * 1/3 + p2[1] * 2/3

    u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x
    u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y

    s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y)
    
    koch(n - 1, p1, s)
    print(' '.join(str(i) for i in s))
    koch(n - 1, s, u)
    print(' '.join(str(i) for i in u))
    koch(n - 1, u, t)
    print(' '.join(str(i) for i in t))
    koch(n - 1, t, p2)
    
     koch if n == 0:
        return

     n == 0 n 0 return s_x = p1[0] * 2/3 + p2[0] * 1/3 s_x p1[0] * 2/3 + p2[0] * 1/3 p1[0] * 2/3 p1[0] * 2 p1[0] p1 0 2 3 p2[0] * 1/3 p2[0] * 1 p2[0] p2 0 1 3 s_y = p1[1] * 2/3 + p2[1] * 1/3 s_y p1[1] * 2/3 + p2[1] * 1/3 p1[1] * 2/3 p1[1] * 2 p1[1] p1 1 2 3 p2[1] * 1/3 p2[1] * 1 p2[1] p2 1 1 3 t_x = p1[0] * 1/3 + p2[0] * 2/3 t_x p1[0] * 1/3 + p2[0] * 2/3 p1[0] * 1/3 p1[0] * 1 p1[0] p1 0 1 3 p2[0] * 2/3 p2[0] * 2 p2[0] p2 0 2 3 t_y = p1[1] * 1/3 + p2[1] * 2/3 t_y p1[1] * 1/3 + p2[1] * 2/3 p1[1] * 1/3 p1[1] * 1 p1[1] p1 1 1 3 p2[1] * 2/3 p2[1] * 2 p2[1] p2 1 2 3 u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x u_x (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 (t_x - s_x) * 1/2 (t_x - s_x) * 1 t_x - s_x t_x s_x 1 2 (t_y - s_y) * 3 ** 0.5 / 2 (t_y - s_y) * 3 ** 0.5 t_y - s_y t_y s_y 3 ** 0.5 3 0.5 2 s_x u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y u_y (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 (t_x - s_x) * 3 ** 0.5 / 2 (t_x - s_x) * 3 ** 0.5 t_x - s_x t_x s_x 3 ** 0.5 3 0.5 2 (t_y - s_y) / 2 t_y - s_y t_y s_y 2 s_y s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y) s (s_x, s_y) s_x s_y t (t_x, t_y) t_x t_y u (u_x, u_y) u_x u_y koch(n - 1, p1, s) koch n - 1 n 1 p1 s print(' '.join(str(i) for i in s)) print ' '.join(str(i) for i in s) ' '.join ' ' join str(i) str i koch(n - 1, s, u) koch n - 1 n 1 s u print(' '.join(str(i) for i in u)) print ' '.join(str(i) for i in u) ' '.join ' ' join str(i) str i koch(n - 1, u, t) koch n - 1 n 1 u t print(' '.join(str(i) for i in t)) print ' '.join(str(i) for i in t) ' '.join ' ' join str(i) str i koch(n - 1, t, p2) koch n - 1 n 1 t p2 n n p1 p1 p2 p2 S, G = (0, 0), (100, 0) S (0, 0) 0 0 G (100, 0) 100 0 print(' '.join(str(i) for i in S)) print ' '.join(str(i) for i in S) ' '.join ' ' join str(i) str i koch(int(input()), S, G) koch int(input()) int input() input S G print(' '.join(str(i) for i in G)) print ' '.join(str(i) for i in G) ' '.join ' ' join str(i) str i S, G = (0, 0), (100, 0) (0, 0) S def koch(n, p1, p2):
    if n == 0:
        return

    s_x = p1[0] * 2/3 + p2[0] * 1/3
    s_y = p1[1] * 2/3 + p2[1] * 1/3

    t_x = p1[0] * 1/3 + p2[0] * 2/3
    t_y = p1[1] * 1/3 + p2[1] * 2/3

    u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x
    u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y

    s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y)
    
    koch(n - 1, p1, s)
    print(' '.join(str(i) for i in s))
    koch(n - 1, s, u)
    print(' '.join(str(i) for i in u))
    koch(n - 1, u, t)
    print(' '.join(str(i) for i in t))
    koch(n - 1, t, p2)
    
     def koch(n, p1, p2):
    if n == 0:
        return

    s_x = p1[0] * 2/3 + p2[0] * 1/3
    s_y = p1[1] * 2/3 + p2[1] * 1/3

    t_x = p1[0] * 1/3 + p2[0] * 2/3
    t_y = p1[1] * 1/3 + p2[1] * 2/3

    u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x
    u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y

    s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y)
    
    koch(n - 1, p1, s)
    print(' '.join(str(i) for i in s))
    koch(n - 1, s, u)
    print(' '.join(str(i) for i in u))
    koch(n - 1, u, t)
    print(' '.join(str(i) for i in t))
    koch(n - 1, t, p2)
    
     koch G = (0, 0), (100, 0) (100, 0) G
def koch(n, p1, p2):
    if n == 0:
        return

    s_x = p1[0] * 2/3 + p2[0] * 1/3
    s_y = p1[1] * 2/3 + p2[1] * 1/3

    t_x = p1[0] * 1/3 + p2[0] * 2/3
    t_y = p1[1] * 1/3 + p2[1] * 2/3

    u_x = (t_x - s_x) * 1/2 - (t_y - s_y) * 3 ** 0.5 / 2 + s_x
    u_y = (t_x - s_x) * 3 ** 0.5 / 2 + (t_y - s_y) / 2 + s_y

    s, t, u = (s_x, s_y), (t_x, t_y), (u_x, u_y)
    
    koch(n - 1, p1, s)
    print(' '.join(str(i) for i in s))
    koch(n - 1, s, u)
    print(' '.join(str(i) for i in u))
    koch(n - 1, u, t)
    print(' '.join(str(i) for i in t))
    koch(n - 1, t, p2)
    
    
S, G = (0, 0), (100, 0)
print(' '.join(str(i) for i in S))
koch(int(input()), S, G)
print(' '.join(str(i) for i in G))

