import math

def koch(n, ax, ay, bx, by):
    if n == 0: return ;
    
    sin = math.sin(math.radians(60))
    cos = math.cos(math.radians(60))
    
    sx = (2.0 * ax + 1.0 * bx) / 3.0
    sy = (2.0 * ay + 1.0 * by) / 3.0
    tx = (1.0 * ax + 2.0 * bx) / 3.0
    ty = (1.0 * ay + 2.0 * by) / 3.0
    ux = (tx - sx) * cos - (ty - sy) * sin + sx
    uy = (tx - sx) * sin + (ty - sy) * cos + sy
    
    koch(n-1, ax, ay, sx, sy)
    print(str(sx)+ " " + str(sy))
    koch(n-1, sx, sy, ux, uy)
    print(str(ux)+ " " + str(uy))
    koch(n-1, ux, uy, tx, ty)
    print(str(tx)+ " " + str(ty))
    koch(n-1, tx, ty, bx, by)

if __name__ == '__main__':
    n = int(input())
    ax = 0.00000000
    ay = 0.00000000
    bx = 100.00000000
    by = 0.00000000
    
    print(str(ax) + " " + str(ay))
    koch(n, ax, ay, bx, by)
    print(str(bx)+ " " + str(by)) import math math def koch(n, ax, ay, bx, by):
    if n == 0: return ;
    
    sin = math.sin(math.radians(60))
    cos = math.cos(math.radians(60))
    
    sx = (2.0 * ax + 1.0 * bx) / 3.0
    sy = (2.0 * ay + 1.0 * by) / 3.0
    tx = (1.0 * ax + 2.0 * bx) / 3.0
    ty = (1.0 * ay + 2.0 * by) / 3.0
    ux = (tx - sx) * cos - (ty - sy) * sin + sx
    uy = (tx - sx) * sin + (ty - sy) * cos + sy
    
    koch(n-1, ax, ay, sx, sy)
    print(str(sx)+ " " + str(sy))
    koch(n-1, sx, sy, ux, uy)
    print(str(ux)+ " " + str(uy))
    koch(n-1, ux, uy, tx, ty)
    print(str(tx)+ " " + str(ty))
    koch(n-1, tx, ty, bx, by) koch if n == 0: return ;
    
     n == 0 n 0 sin = math.sin(math.radians(60)) sin math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 cos = math.cos(math.radians(60)) cos math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 sx = (2.0 * ax + 1.0 * bx) / 3.0 sx (2.0 * ax + 1.0 * bx) / 3.0 2.0 * ax + 1.0 * bx 2.0 * ax 2.0 ax 1.0 * bx 1.0 bx 3.0 sy = (2.0 * ay + 1.0 * by) / 3.0 sy (2.0 * ay + 1.0 * by) / 3.0 2.0 * ay + 1.0 * by 2.0 * ay 2.0 ay 1.0 * by 1.0 by 3.0 tx = (1.0 * ax + 2.0 * bx) / 3.0 tx (1.0 * ax + 2.0 * bx) / 3.0 1.0 * ax + 2.0 * bx 1.0 * ax 1.0 ax 2.0 * bx 2.0 bx 3.0 ty = (1.0 * ay + 2.0 * by) / 3.0 ty (1.0 * ay + 2.0 * by) / 3.0 1.0 * ay + 2.0 * by 1.0 * ay 1.0 ay 2.0 * by 2.0 by 3.0 ux = (tx - sx) * cos - (ty - sy) * sin + sx ux (tx - sx) * cos - (ty - sy) * sin + sx (tx - sx) * cos - (ty - sy) * sin (tx - sx) * cos tx - sx tx sx cos (ty - sy) * sin ty - sy ty sy sin sx uy = (tx - sx) * sin + (ty - sy) * cos + sy uy (tx - sx) * sin + (ty - sy) * cos + sy (tx - sx) * sin + (ty - sy) * cos (tx - sx) * sin tx - sx tx sx sin (ty - sy) * cos ty - sy ty sy cos sy koch(n-1, ax, ay, sx, sy) koch n-1 n 1 ax ay sx sy print(str(sx)+ " " + str(sy)) print str(sx)+ " " + str(sy) str(sx)+ " " str(sx) str sx " " str(sy) str sy koch(n-1, sx, sy, ux, uy) koch n-1 n 1 sx sy ux uy print(str(ux)+ " " + str(uy)) print str(ux)+ " " + str(uy) str(ux)+ " " str(ux) str ux " " str(uy) str uy koch(n-1, ux, uy, tx, ty) koch n-1 n 1 ux uy tx ty print(str(tx)+ " " + str(ty)) print str(tx)+ " " + str(ty) str(tx)+ " " str(tx) str tx " " str(ty) str ty koch(n-1, tx, ty, bx, by) koch n-1 n 1 tx ty bx by n n ax ax ay ay bx bx by by if __name__ == '__main__':
    n = int(input())
    ax = 0.00000000
    ay = 0.00000000
    bx = 100.00000000
    by = 0.00000000
    
    print(str(ax) + " " + str(ay))
    koch(n, ax, ay, bx, by)
    print(str(bx)+ " " + str(by)) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input ax = 0.00000000 ax 0.00000000 ay = 0.00000000 ay 0.00000000 bx = 100.00000000 bx 100.00000000 by = 0.00000000 by 0.00000000 print(str(ax) + " " + str(ay)) print str(ax) + " " + str(ay) str(ax) + " " str(ax) str ax " " str(ay) str ay koch(n, ax, ay, bx, by) koch n ax ay bx by print(str(bx)+ " " + str(by)) print str(bx)+ " " + str(by) str(bx)+ " " str(bx) str bx " " str(by) str by n = int(input()) int(input()) n ay = 0.00000000 0.00000000 ay def koch(n, ax, ay, bx, by):
    if n == 0: return ;
    
    sin = math.sin(math.radians(60))
    cos = math.cos(math.radians(60))
    
    sx = (2.0 * ax + 1.0 * bx) / 3.0
    sy = (2.0 * ay + 1.0 * by) / 3.0
    tx = (1.0 * ax + 2.0 * bx) / 3.0
    ty = (1.0 * ay + 2.0 * by) / 3.0
    ux = (tx - sx) * cos - (ty - sy) * sin + sx
    uy = (tx - sx) * sin + (ty - sy) * cos + sy
    
    koch(n-1, ax, ay, sx, sy)
    print(str(sx)+ " " + str(sy))
    koch(n-1, sx, sy, ux, uy)
    print(str(ux)+ " " + str(uy))
    koch(n-1, ux, uy, tx, ty)
    print(str(tx)+ " " + str(ty))
    koch(n-1, tx, ty, bx, by) def koch(n, ax, ay, bx, by):
    if n == 0: return ;
    
    sin = math.sin(math.radians(60))
    cos = math.cos(math.radians(60))
    
    sx = (2.0 * ax + 1.0 * bx) / 3.0
    sy = (2.0 * ay + 1.0 * by) / 3.0
    tx = (1.0 * ax + 2.0 * bx) / 3.0
    ty = (1.0 * ay + 2.0 * by) / 3.0
    ux = (tx - sx) * cos - (ty - sy) * sin + sx
    uy = (tx - sx) * sin + (ty - sy) * cos + sy
    
    koch(n-1, ax, ay, sx, sy)
    print(str(sx)+ " " + str(sy))
    koch(n-1, sx, sy, ux, uy)
    print(str(ux)+ " " + str(uy))
    koch(n-1, ux, uy, tx, ty)
    print(str(tx)+ " " + str(ty))
    koch(n-1, tx, ty, bx, by) koch by = 0.00000000 0.00000000 by ax = 0.00000000 0.00000000 ax bx = 100.00000000 100.00000000 bx
import math

def koch(n, ax, ay, bx, by):
    if n == 0: return ;
    
    sin = math.sin(math.radians(60))
    cos = math.cos(math.radians(60))
    
    sx = (2.0 * ax + 1.0 * bx) / 3.0
    sy = (2.0 * ay + 1.0 * by) / 3.0
    tx = (1.0 * ax + 2.0 * bx) / 3.0
    ty = (1.0 * ay + 2.0 * by) / 3.0
    ux = (tx - sx) * cos - (ty - sy) * sin + sx
    uy = (tx - sx) * sin + (ty - sy) * cos + sy
    
    koch(n-1, ax, ay, sx, sy)
    print(str(sx)+ " " + str(sy))
    koch(n-1, sx, sy, ux, uy)
    print(str(ux)+ " " + str(uy))
    koch(n-1, ux, uy, tx, ty)
    print(str(tx)+ " " + str(ty))
    koch(n-1, tx, ty, bx, by)

if __name__ == '__main__':
    n = int(input())
    ax = 0.00000000
    ay = 0.00000000
    bx = 100.00000000
    by = 0.00000000
    
    print(str(ax) + " " + str(ay))
    koch(n, ax, ay, bx, by)
    print(str(bx)+ " " + str(by))
