import math
n = int(input())
edge_s = (0.0, 0.0)
edge_e = (100.0, 0.0)

def print_tuple(tup):
    print("%.8f %.8f"%(tup[0],tup[1]))

def koch(start, end, n):
    if(n == 0):
        return
    s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3)
    t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3)
    u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3))
    n -= 1
    koch(start, s, n)
    print_tuple(s)
    koch(s, u, n)
    print_tuple(u)
    koch(u, t, n)
    print_tuple(t)
    koch(t, end, n)
print_tuple(edge_s)
koch(edge_s, edge_e, n)
print_tuple(edge_e)
 import math math n = int(input()) n int(input()) int input() input edge_s = (0.0, 0.0) edge_s (0.0, 0.0) 0.0 0.0 edge_e = (100.0, 0.0) edge_e (100.0, 0.0) 100.0 0.0 def print_tuple(tup):
    print("%.8f %.8f"%(tup[0],tup[1])) print_tuple print("%.8f %.8f"%(tup[0],tup[1])) print "%.8f %.8f"%(tup[0],tup[1]) "%.8f %.8f" (tup[0],tup[1]) tup[0] tup 0 tup[1] tup 1 tup tup def koch(start, end, n):
    if(n == 0):
        return
    s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3)
    t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3)
    u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3))
    n -= 1
    koch(start, s, n)
    print_tuple(s)
    koch(s, u, n)
    print_tuple(u)
    koch(u, t, n)
    print_tuple(t)
    koch(t, end, n) koch if(n == 0):
        return
     n == 0 n 0 return s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3) s ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3) (2*start[0] + end[0]) / 3 2*start[0] + end[0] 2*start[0] 2 start[0] start 0 end[0] end 0 3 (2*start[1] + end[1])/3 2*start[1] + end[1] 2*start[1] 2 start[1] start 1 end[1] end 1 3 t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3) t ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3) (start[0] + 2*end[0]) / 3 start[0] + 2*end[0] start[0] start 0 2*end[0] 2 end[0] end 0 3 (start[1] + 2*end[1])/3 start[1] + 2*end[1] start[1] start 1 2*end[1] 2 end[1] end 1 3 u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3)) u (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3)) s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3) s[0] +  (t[0]-s[0])*math.cos(math.pi/3) s[0] s 0 (t[0]-s[0])*math.cos(math.pi/3) t[0]-s[0] t[0] t 0 s[0] s 0 math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 (t[1]-s[1])*math.sin(math.pi/3) t[1]-s[1] t[1] t 1 s[1] s 1 math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3) s[1] + (t[0]-s[0]) * math.sin(math.pi/3) s[1] s 1 (t[0]-s[0]) * math.sin(math.pi/3) t[0]-s[0] t[0] t 0 s[0] s 0 math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 (t[1]-s[1]) * math.cos(math.pi/3) t[1]-s[1] t[1] t 1 s[1] s 1 math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 n -= 1 n 1 koch(start, s, n) koch start s n print_tuple(s) print_tuple s koch(s, u, n) koch s u n print_tuple(u) print_tuple u koch(u, t, n) koch u t n print_tuple(t) print_tuple t koch(t, end, n) koch t end n start start end end n n print_tuple(edge_s) print_tuple edge_s koch(edge_s, edge_e, n) koch edge_s edge_e n print_tuple(edge_e) print_tuple edge_e n = int(input()) int(input()) n def koch(start, end, n):
    if(n == 0):
        return
    s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3)
    t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3)
    u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3))
    n -= 1
    koch(start, s, n)
    print_tuple(s)
    koch(s, u, n)
    print_tuple(u)
    koch(u, t, n)
    print_tuple(t)
    koch(t, end, n) def koch(start, end, n):
    if(n == 0):
        return
    s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3)
    t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3)
    u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3))
    n -= 1
    koch(start, s, n)
    print_tuple(s)
    koch(s, u, n)
    print_tuple(u)
    koch(u, t, n)
    print_tuple(t)
    koch(t, end, n) koch edge_s = (0.0, 0.0) (0.0, 0.0) edge_s def print_tuple(tup):
    print("%.8f %.8f"%(tup[0],tup[1])) def print_tuple(tup):
    print("%.8f %.8f"%(tup[0],tup[1])) print_tuple edge_e = (100.0, 0.0) (100.0, 0.0) edge_e
import math
n = int(input())
edge_s = (0.0, 0.0)
edge_e = (100.0, 0.0)

def print_tuple(tup):
    print("%.8f %.8f"%(tup[0],tup[1]))

def koch(start, end, n):
    if(n == 0):
        return
    s = ((2*start[0] + end[0]) / 3, (2*start[1] + end[1])/3)
    t = ((start[0] + 2*end[0]) / 3, (start[1] + 2*end[1])/3)
    u = (s[0] +  (t[0]-s[0])*math.cos(math.pi/3)-(t[1]-s[1])*math.sin(math.pi/3), s[1] + (t[0]-s[0]) * math.sin(math.pi/3) + (t[1]-s[1]) * math.cos(math.pi/3))
    n -= 1
    koch(start, s, n)
    print_tuple(s)
    koch(s, u, n)
    print_tuple(u)
    koch(u, t, n)
    print_tuple(t)
    koch(t, end, n)
print_tuple(edge_s)
koch(edge_s, edge_e, n)
print_tuple(edge_e)

