# coding=utf-8
import math

def koch(p1, p2, n):
    if n == 0:
        return None
    p1_x = p1[0]
    p1_y = p1[1]
    p2_x = p2[0]
    p2_y = p2[1]

    s_x = (1/3) * (2*p1_x + p2_x)
    s_y = (1/3) * (2*p1_y + p2_y)
    t_x = (1/3) * (p1_x + 2*p2_x)
    t_y = (1/3) * (p1_y + 2*p2_y)

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

    koch([p1_x, p1_y], [s_x, s_y], n-1)
    print("%.8f %.8f" %(s_x, s_y))
    koch([s_x, s_y], [u_x, u_y], n-1)
    print("%.8f %.8f" %(u_x, u_y))
    koch([u_x, u_y], [t_x, t_y], n-1)
    print("%.8f %.8f" %(t_x, t_y))
    koch([t_x, t_y], [p2_x, p2_y], n-1)


n = int(input())
p1 = [0, 0]
p2 = [100, 0]
print("%.8f %.8f" %(p1[0], p1[1]))
koch(p1, p2, n)
print("%.8f %.8f" %(p2[0], p2[1])) import math math def koch(p1, p2, n):
    if n == 0:
        return None
    p1_x = p1[0]
    p1_y = p1[1]
    p2_x = p2[0]
    p2_y = p2[1]

    s_x = (1/3) * (2*p1_x + p2_x)
    s_y = (1/3) * (2*p1_y + p2_y)
    t_x = (1/3) * (p1_x + 2*p2_x)
    t_y = (1/3) * (p1_y + 2*p2_y)

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

    koch([p1_x, p1_y], [s_x, s_y], n-1)
    print("%.8f %.8f" %(s_x, s_y))
    koch([s_x, s_y], [u_x, u_y], n-1)
    print("%.8f %.8f" %(u_x, u_y))
    koch([u_x, u_y], [t_x, t_y], n-1)
    print("%.8f %.8f" %(t_x, t_y))
    koch([t_x, t_y], [p2_x, p2_y], n-1) koch if n == 0:
        return None
     n == 0 n 0 return None None p1_x = p1[0] p1_x p1[0] p1 0 p1_y = p1[1] p1_y p1[1] p1 1 p2_x = p2[0] p2_x p2[0] p2 0 p2_y = p2[1] p2_y p2[1] p2 1 s_x = (1/3) * (2*p1_x + p2_x) s_x (1/3) * (2*p1_x + p2_x) 1/3 1 3 2*p1_x + p2_x 2*p1_x 2 p1_x p2_x s_y = (1/3) * (2*p1_y + p2_y) s_y (1/3) * (2*p1_y + p2_y) 1/3 1 3 2*p1_y + p2_y 2*p1_y 2 p1_y p2_y t_x = (1/3) * (p1_x + 2*p2_x) t_x (1/3) * (p1_x + 2*p2_x) 1/3 1 3 p1_x + 2*p2_x p1_x 2*p2_x 2 p2_x t_y = (1/3) * (p1_y + 2*p2_y) t_y (1/3) * (p1_y + 2*p2_y) 1/3 1 3 p1_y + 2*p2_y p1_y 2*p2_y 2 p2_y u_x = s_x + (1/2)*(t_x-s_x) + (-math.sqrt(3)/2)*(t_y-s_y) u_x s_x + (1/2)*(t_x-s_x) + (-math.sqrt(3)/2)*(t_y-s_y) s_x + (1/2)*(t_x-s_x) s_x (1/2)*(t_x-s_x) 1/2 1 2 t_x-s_x t_x s_x (-math.sqrt(3)/2)*(t_y-s_y) -math.sqrt(3)/2 -math.sqrt(3) math.sqrt(3) math.sqrt math sqrt 3 2 t_y-s_y t_y s_y u_y = s_y + (math.sqrt(3)/2)*(t_x-s_x) + (1/2)*(t_y-s_y) u_y s_y + (math.sqrt(3)/2)*(t_x-s_x) + (1/2)*(t_y-s_y) s_y + (math.sqrt(3)/2)*(t_x-s_x) s_y (math.sqrt(3)/2)*(t_x-s_x) math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 t_x-s_x t_x s_x (1/2)*(t_y-s_y) 1/2 1 2 t_y-s_y t_y s_y koch([p1_x, p1_y], [s_x, s_y], n-1) koch [p1_x, p1_y] p1_x p1_y [s_x, s_y] s_x s_y n-1 n 1 print("%.8f %.8f" %(s_x, s_y)) print "%.8f %.8f" %(s_x, s_y) "%.8f %.8f" (s_x, s_y) s_x s_y koch([s_x, s_y], [u_x, u_y], n-1) koch [s_x, s_y] s_x s_y [u_x, u_y] u_x u_y n-1 n 1 print("%.8f %.8f" %(u_x, u_y)) print "%.8f %.8f" %(u_x, u_y) "%.8f %.8f" (u_x, u_y) u_x u_y koch([u_x, u_y], [t_x, t_y], n-1) koch [u_x, u_y] u_x u_y [t_x, t_y] t_x t_y n-1 n 1 print("%.8f %.8f" %(t_x, t_y)) print "%.8f %.8f" %(t_x, t_y) "%.8f %.8f" (t_x, t_y) t_x t_y koch([t_x, t_y], [p2_x, p2_y], n-1) koch [t_x, t_y] t_x t_y [p2_x, p2_y] p2_x p2_y n-1 n 1 p1 p1 p2 p2 n n 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 print("%.8f %.8f" %(p1[0], p1[1])) print "%.8f %.8f" %(p1[0], p1[1]) "%.8f %.8f" (p1[0], p1[1]) p1[0] p1 0 p1[1] p1 1 koch(p1, p2, n) koch p1 p2 n print("%.8f %.8f" %(p2[0], p2[1])) print "%.8f %.8f" %(p2[0], p2[1]) "%.8f %.8f" (p2[0], p2[1]) p2[0] p2 0 p2[1] p2 1 p2 = [100, 0] [100, 0] p2 p1 = [0, 0] [0, 0] p1 n = int(input()) int(input()) n def koch(p1, p2, n):
    if n == 0:
        return None
    p1_x = p1[0]
    p1_y = p1[1]
    p2_x = p2[0]
    p2_y = p2[1]

    s_x = (1/3) * (2*p1_x + p2_x)
    s_y = (1/3) * (2*p1_y + p2_y)
    t_x = (1/3) * (p1_x + 2*p2_x)
    t_y = (1/3) * (p1_y + 2*p2_y)

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

    koch([p1_x, p1_y], [s_x, s_y], n-1)
    print("%.8f %.8f" %(s_x, s_y))
    koch([s_x, s_y], [u_x, u_y], n-1)
    print("%.8f %.8f" %(u_x, u_y))
    koch([u_x, u_y], [t_x, t_y], n-1)
    print("%.8f %.8f" %(t_x, t_y))
    koch([t_x, t_y], [p2_x, p2_y], n-1) def koch(p1, p2, n):
    if n == 0:
        return None
    p1_x = p1[0]
    p1_y = p1[1]
    p2_x = p2[0]
    p2_y = p2[1]

    s_x = (1/3) * (2*p1_x + p2_x)
    s_y = (1/3) * (2*p1_y + p2_y)
    t_x = (1/3) * (p1_x + 2*p2_x)
    t_y = (1/3) * (p1_y + 2*p2_y)

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

    koch([p1_x, p1_y], [s_x, s_y], n-1)
    print("%.8f %.8f" %(s_x, s_y))
    koch([s_x, s_y], [u_x, u_y], n-1)
    print("%.8f %.8f" %(u_x, u_y))
    koch([u_x, u_y], [t_x, t_y], n-1)
    print("%.8f %.8f" %(t_x, t_y))
    koch([t_x, t_y], [p2_x, p2_y], n-1) koch
# coding=utf-8
import math

def koch(p1, p2, n):
    if n == 0:
        return None
    p1_x = p1[0]
    p1_y = p1[1]
    p2_x = p2[0]
    p2_y = p2[1]

    s_x = (1/3) * (2*p1_x + p2_x)
    s_y = (1/3) * (2*p1_y + p2_y)
    t_x = (1/3) * (p1_x + 2*p2_x)
    t_y = (1/3) * (p1_y + 2*p2_y)

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

    koch([p1_x, p1_y], [s_x, s_y], n-1)
    print("%.8f %.8f" %(s_x, s_y))
    koch([s_x, s_y], [u_x, u_y], n-1)
    print("%.8f %.8f" %(u_x, u_y))
    koch([u_x, u_y], [t_x, t_y], n-1)
    print("%.8f %.8f" %(t_x, t_y))
    koch([t_x, t_y], [p2_x, p2_y], n-1)


n = int(input())
p1 = [0, 0]
p2 = [100, 0]
print("%.8f %.8f" %(p1[0], p1[1]))
koch(p1, p2, n)
print("%.8f %.8f" %(p2[0], p2[1]))