import math

c60 = math.cos(math.radians(60))
s60 = math.sin(math.radians(60))

def koch(d, p1, p2):
    if d == 0:
        return
    
    sx = (p2[0] + 2 * p1[0]) / 3
    sy = (p2[1] + 2 * p1[1]) / 3
    tx = (p2[0] * 2 + p1[0]) / 3
    ty = (p2[1] * 2 + p1[1]) / 3
    ux = (tx - sx) * c60 - (ty - sy) * s60 + sx
    uy = (tx - sx) * s60 + (ty - sy) * c60 + sy
    
    koch(d-1, p1, (sx, sy))
    print("{0:.5f} {1:.5f}".format(sx, sy))
 
    koch(d-1, (sx, sy), (ux, uy))
    print("{0:.5f} {1:.5f}".format(ux, uy))
 
    koch(d-1, (ux, uy), (tx, ty))
    print("{0:.5f} {1:.5f}".format(tx, ty))
    
    koch(d-1, (tx, ty), p2)

n = int(input())

print("0 0")
koch(n, (0, 0), (100, 0))
print("100 0")  import math math c60 = math.cos(math.radians(60)) c60 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 s60 = math.sin(math.radians(60)) s60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 def koch(d, p1, p2):
    if d == 0:
        return
    
    sx = (p2[0] + 2 * p1[0]) / 3
    sy = (p2[1] + 2 * p1[1]) / 3
    tx = (p2[0] * 2 + p1[0]) / 3
    ty = (p2[1] * 2 + p1[1]) / 3
    ux = (tx - sx) * c60 - (ty - sy) * s60 + sx
    uy = (tx - sx) * s60 + (ty - sy) * c60 + sy
    
    koch(d-1, p1, (sx, sy))
    print("{0:.5f} {1:.5f}".format(sx, sy))
 
    koch(d-1, (sx, sy), (ux, uy))
    print("{0:.5f} {1:.5f}".format(ux, uy))
 
    koch(d-1, (ux, uy), (tx, ty))
    print("{0:.5f} {1:.5f}".format(tx, ty))
    
    koch(d-1, (tx, ty), p2) koch if d == 0:
        return
    
     d == 0 d 0 return sx = (p2[0] + 2 * p1[0]) / 3 sx (p2[0] + 2 * p1[0]) / 3 p2[0] + 2 * p1[0] p2[0] p2 0 2 * p1[0] 2 p1[0] p1 0 3 sy = (p2[1] + 2 * p1[1]) / 3 sy (p2[1] + 2 * p1[1]) / 3 p2[1] + 2 * p1[1] p2[1] p2 1 2 * p1[1] 2 p1[1] p1 1 3 tx = (p2[0] * 2 + p1[0]) / 3 tx (p2[0] * 2 + p1[0]) / 3 p2[0] * 2 + p1[0] p2[0] * 2 p2[0] p2 0 2 p1[0] p1 0 3 ty = (p2[1] * 2 + p1[1]) / 3 ty (p2[1] * 2 + p1[1]) / 3 p2[1] * 2 + p1[1] p2[1] * 2 p2[1] p2 1 2 p1[1] p1 1 3 ux = (tx - sx) * c60 - (ty - sy) * s60 + sx ux (tx - sx) * c60 - (ty - sy) * s60 + sx (tx - sx) * c60 - (ty - sy) * s60 (tx - sx) * c60 tx - sx tx sx c60 (ty - sy) * s60 ty - sy ty sy s60 sx uy = (tx - sx) * s60 + (ty - sy) * c60 + sy uy (tx - sx) * s60 + (ty - sy) * c60 + sy (tx - sx) * s60 + (ty - sy) * c60 (tx - sx) * s60 tx - sx tx sx s60 (ty - sy) * c60 ty - sy ty sy c60 sy koch(d-1, p1, (sx, sy)) koch d-1 d 1 p1 (sx, sy) sx sy print("{0:.5f} {1:.5f}".format(sx, sy)) print "{0:.5f} {1:.5f}".format(sx, sy) "{0:.5f} {1:.5f}".format "{0:.5f} {1:.5f}" format sx sy koch(d-1, (sx, sy), (ux, uy)) koch d-1 d 1 (sx, sy) sx sy (ux, uy) ux uy print("{0:.5f} {1:.5f}".format(ux, uy)) print "{0:.5f} {1:.5f}".format(ux, uy) "{0:.5f} {1:.5f}".format "{0:.5f} {1:.5f}" format ux uy koch(d-1, (ux, uy), (tx, ty)) koch d-1 d 1 (ux, uy) ux uy (tx, ty) tx ty print("{0:.5f} {1:.5f}".format(tx, ty)) print "{0:.5f} {1:.5f}".format(tx, ty) "{0:.5f} {1:.5f}".format "{0:.5f} {1:.5f}" format tx ty koch(d-1, (tx, ty), p2) koch d-1 d 1 (tx, ty) tx ty p2 d d p1 p1 p2 p2 n = int(input()) n int(input()) int input() input print("0 0") print "0 0" koch(n, (0, 0), (100, 0)) koch n (0, 0) 0 0 (100, 0) 100 0 print("100 0") print "100 0" c60 = math.cos(math.radians(60)) math.cos(math.radians(60)) c60 n = int(input()) int(input()) n s60 = math.sin(math.radians(60)) math.sin(math.radians(60)) s60 def koch(d, p1, p2):
    if d == 0:
        return
    
    sx = (p2[0] + 2 * p1[0]) / 3
    sy = (p2[1] + 2 * p1[1]) / 3
    tx = (p2[0] * 2 + p1[0]) / 3
    ty = (p2[1] * 2 + p1[1]) / 3
    ux = (tx - sx) * c60 - (ty - sy) * s60 + sx
    uy = (tx - sx) * s60 + (ty - sy) * c60 + sy
    
    koch(d-1, p1, (sx, sy))
    print("{0:.5f} {1:.5f}".format(sx, sy))
 
    koch(d-1, (sx, sy), (ux, uy))
    print("{0:.5f} {1:.5f}".format(ux, uy))
 
    koch(d-1, (ux, uy), (tx, ty))
    print("{0:.5f} {1:.5f}".format(tx, ty))
    
    koch(d-1, (tx, ty), p2) def koch(d, p1, p2):
    if d == 0:
        return
    
    sx = (p2[0] + 2 * p1[0]) / 3
    sy = (p2[1] + 2 * p1[1]) / 3
    tx = (p2[0] * 2 + p1[0]) / 3
    ty = (p2[1] * 2 + p1[1]) / 3
    ux = (tx - sx) * c60 - (ty - sy) * s60 + sx
    uy = (tx - sx) * s60 + (ty - sy) * c60 + sy
    
    koch(d-1, p1, (sx, sy))
    print("{0:.5f} {1:.5f}".format(sx, sy))
 
    koch(d-1, (sx, sy), (ux, uy))
    print("{0:.5f} {1:.5f}".format(ux, uy))
 
    koch(d-1, (ux, uy), (tx, ty))
    print("{0:.5f} {1:.5f}".format(tx, ty))
    
    koch(d-1, (tx, ty), p2) koch
import math

c60 = math.cos(math.radians(60))
s60 = math.sin(math.radians(60))

def koch(d, p1, p2):
    if d == 0:
        return
    
    sx = (p2[0] + 2 * p1[0]) / 3
    sy = (p2[1] + 2 * p1[1]) / 3
    tx = (p2[0] * 2 + p1[0]) / 3
    ty = (p2[1] * 2 + p1[1]) / 3
    ux = (tx - sx) * c60 - (ty - sy) * s60 + sx
    uy = (tx - sx) * s60 + (ty - sy) * c60 + sy
    
    koch(d-1, p1, (sx, sy))
    print("{0:.5f} {1:.5f}".format(sx, sy))
 
    koch(d-1, (sx, sy), (ux, uy))
    print("{0:.5f} {1:.5f}".format(ux, uy))
 
    koch(d-1, (ux, uy), (tx, ty))
    print("{0:.5f} {1:.5f}".format(tx, ty))
    
    koch(d-1, (tx, ty), p2)

n = int(input())

print("0 0")
koch(n, (0, 0), (100, 0))
print("100 0") 
