
n = input()

def koch(n,p1,p2):
    s = [0] * 2 
    t = [0] * 2 
    u = [0] * 2 
    if n == 0:
        return 0
    s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00
    s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00
    t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00
    t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00
    u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] 
    u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1]    


    koch(n-1, p1, s)
    print "{0:.10f}".format(s[0]),"{0:.10f}".format(s[1])
    koch(n-1, s, u)
    print "{0:.10f}".format(u[0]),"{0:.10f}".format(u[1])
    koch(n-1, u, t)
    print "{0:.10f}".format(t[0]),"{0:.10f}".format(t[1])  
    koch(n-1, t, p2)




start = [0.00,0.00]
goal = [100.00,0.00]
print "{0:.10f}".format(start[0]),"{0:.10f}".format(start[1])
koch(n,start,goal)
print "{0:.10f}".format(goal[0]),"{0:.10f}".format(goal[1]) n = input() n input() input def koch(n,p1,p2):
    s = [0] * 2 
    t = [0] * 2 
    u = [0] * 2 
    if n == 0:
        return 0
    s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00
    s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00
    t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00
    t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00
    u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] 
    u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1]    


    koch(n-1, p1, s)
    print "{0:.10f}".format(s[0]),"{0:.10f}".format(s[1])
    koch(n-1, s, u)
    print "{0:.10f}".format(u[0]),"{0:.10f}".format(u[1])
    koch(n-1, u, t)
    print "{0:.10f}".format(t[0]),"{0:.10f}".format(t[1])  
    koch(n-1, t, p2) koch s = [0] * 2 s [0] * 2 [0] 0 2 t = [0] * 2 t [0] * 2 [0] 0 2 u = [0] * 2 u [0] * 2 [0] 0 2 if n == 0:
        return 0
     n == 0 n 0 return 0 0 s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00 s[0] s 0 (2.00 * p1[0] + 1.00 * p2[0]) / 3.00 2.00 * p1[0] + 1.00 * p2[0] 2.00 * p1[0] 2.00 p1[0] p1 0 1.00 * p2[0] 1.00 p2[0] p2 0 3.00 s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00 s[1] s 1 (2.00 * p1[1] + 1.00 * p2[1]) / 3.00 2.00 * p1[1] + 1.00 * p2[1] 2.00 * p1[1] 2.00 p1[1] p1 1 1.00 * p2[1] 1.00 p2[1] p2 1 3.00 t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00 t[0] t 0 (1.00 * p1[0] + 2.00 * p2[0]) / 3.00 1.00 * p1[0] + 2.00 * p2[0] 1.00 * p1[0] 1.00 p1[0] p1 0 2.00 * p2[0] 2.00 p2[0] p2 0 3.00 t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00 t[1] t 1 (1.00 * p1[1] + 2.00 * p2[1]) / 3.00 1.00 * p1[1] + 2.00 * p2[1] 1.00 * p1[1] 1.00 p1[1] p1 1 2.00 * p2[1] 2.00 p2[1] p2 1 3.00 u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] u[0] u 0 (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) (t[0] - s[0]) * (1.00 / 2.00) t[0] - s[0] t[0] t 0 s[0] s 0 1.00 / 2.00 1.00 2.00 (t[1] - s[1]) * (3.00**0.5 / 2.00) t[1] - s[1] t[1] t 1 s[1] s 1 3.00**0.5 / 2.00 3.00**0.5 3.00 0.5 2.00 s[0] s 0 u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1] u[1] u 1 (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1] (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) (t[0] - s[0]) * (3.00**0.5 / 2.00) t[0] - s[0] t[0] t 0 s[0] s 0 3.00**0.5 / 2.00 3.00**0.5 3.00 0.5 2.00 (t[1] - s[1]) * (1.00 / 2.00) t[1] - s[1] t[1] t 1 s[1] s 1 1.00 / 2.00 1.00 2.00 s[1] s 1 koch(n-1, p1, s) koch n-1 n 1 p1 s print "{0:.10f}".format(s[0]) "{0:.10f}".format "{0:.10f}" format s[0] s 0 "{0:.10f}".format(s[1]) "{0:.10f}".format "{0:.10f}" format s[1] s 1 koch(n-1, s, u) koch n-1 n 1 s u print "{0:.10f}".format(u[0]) "{0:.10f}".format "{0:.10f}" format u[0] u 0 "{0:.10f}".format(u[1]) "{0:.10f}".format "{0:.10f}" format u[1] u 1 koch(n-1, u, t) koch n-1 n 1 u t print "{0:.10f}".format(t[0]) "{0:.10f}".format "{0:.10f}" format t[0] t 0 "{0:.10f}".format(t[1]) "{0:.10f}".format "{0:.10f}" format t[1] t 1 koch(n-1, t, p2) koch n-1 n 1 t p2 n n p1 p1 p2 p2 start = [0.00,0.00] start [0.00,0.00] 0.00 0.00 goal = [100.00,0.00] goal [100.00,0.00] 100.00 0.00 print "{0:.10f}".format(start[0]) "{0:.10f}".format "{0:.10f}" format start[0] start 0 "{0:.10f}".format(start[1]) "{0:.10f}".format "{0:.10f}" format start[1] start 1 koch(n,start,goal) koch n start goal print "{0:.10f}".format(goal[0]) "{0:.10f}".format "{0:.10f}" format goal[0] goal 0 "{0:.10f}".format(goal[1]) "{0:.10f}".format "{0:.10f}" format goal[1] goal 1 start = [0.00,0.00] [0.00,0.00] start goal = [100.00,0.00] [100.00,0.00] goal n = input() input() n def koch(n,p1,p2):
    s = [0] * 2 
    t = [0] * 2 
    u = [0] * 2 
    if n == 0:
        return 0
    s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00
    s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00
    t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00
    t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00
    u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] 
    u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1]    


    koch(n-1, p1, s)
    print "{0:.10f}".format(s[0]),"{0:.10f}".format(s[1])
    koch(n-1, s, u)
    print "{0:.10f}".format(u[0]),"{0:.10f}".format(u[1])
    koch(n-1, u, t)
    print "{0:.10f}".format(t[0]),"{0:.10f}".format(t[1])  
    koch(n-1, t, p2) def koch(n,p1,p2):
    s = [0] * 2 
    t = [0] * 2 
    u = [0] * 2 
    if n == 0:
        return 0
    s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00
    s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00
    t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00
    t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00
    u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] 
    u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1]    


    koch(n-1, p1, s)
    print "{0:.10f}".format(s[0]),"{0:.10f}".format(s[1])
    koch(n-1, s, u)
    print "{0:.10f}".format(u[0]),"{0:.10f}".format(u[1])
    koch(n-1, u, t)
    print "{0:.10f}".format(t[0]),"{0:.10f}".format(t[1])  
    koch(n-1, t, p2) koch

n = input()

def koch(n,p1,p2):
    s = [0] * 2 
    t = [0] * 2 
    u = [0] * 2 
    if n == 0:
        return 0
    s[0] = (2.00 * p1[0] + 1.00 * p2[0]) / 3.00
    s[1] = (2.00 * p1[1] + 1.00 * p2[1]) / 3.00
    t[0] = (1.00 * p1[0] + 2.00 * p2[0]) / 3.00
    t[1] = (1.00 * p1[1] + 2.00 * p2[1]) / 3.00
    u[0] = (t[0] - s[0]) * (1.00 / 2.00) - (t[1] - s[1]) * (3.00**0.5 / 2.00) + s[0] 
    u[1] = (t[0] - s[0]) * (3.00**0.5 / 2.00) + (t[1] - s[1]) * (1.00 / 2.00) + s[1]    


    koch(n-1, p1, s)
    print "{0:.10f}".format(s[0]),"{0:.10f}".format(s[1])
    koch(n-1, s, u)
    print "{0:.10f}".format(u[0]),"{0:.10f}".format(u[1])
    koch(n-1, u, t)
    print "{0:.10f}".format(t[0]),"{0:.10f}".format(t[1])  
    koch(n-1, t, p2)




start = [0.00,0.00]
goal = [100.00,0.00]
print "{0:.10f}".format(start[0]),"{0:.10f}".format(start[1])
koch(n,start,goal)
print "{0:.10f}".format(goal[0]),"{0:.10f}".format(goal[1])