import math
dig_six = math.radians(60)

def koch(d, p1, p2):
    if d == 0:
        return d
    #calc s, u, t from p1, p2
    s_x = (2*p1[0]+1 * p2[0]) / 3
    s_y = (2*p1[1]+1 * p2[1]) / 3
    s = (s_x, s_y)
    t_x = (1*p1[0]+2 * p2[0]) / 3
    t_y = (1*p1[1]+2 * p2[1]) / 3
    t = (t_x, t_y)
    u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x
    u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y
    u = (u_x, u_y)
    
    koch(d-1, p1, s)
    print (' '.join([str(x) for x in s]))
    koch(d-1, s, u)
    print (' '.join([str(x) for x in u]))
    koch(d-1, u, t)
    print (' '.join([str(x) for x in t]))
    koch(d-1, t, p2)

if __name__ == '__main__':
    iterate = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print (' '.join([str(x) for x in p1]))
    koch(iterate, p1, p2)
    print (' '.join([str(x) for x in p2])) import math math dig_six = math.radians(60) dig_six math.radians(60) math.radians math radians 60 def koch(d, p1, p2):
    if d == 0:
        return d
    #calc s, u, t from p1, p2
    s_x = (2*p1[0]+1 * p2[0]) / 3
    s_y = (2*p1[1]+1 * p2[1]) / 3
    s = (s_x, s_y)
    t_x = (1*p1[0]+2 * p2[0]) / 3
    t_y = (1*p1[1]+2 * p2[1]) / 3
    t = (t_x, t_y)
    u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x
    u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y
    u = (u_x, u_y)
    
    koch(d-1, p1, s)
    print (' '.join([str(x) for x in s]))
    koch(d-1, s, u)
    print (' '.join([str(x) for x in u]))
    koch(d-1, u, t)
    print (' '.join([str(x) for x in t]))
    koch(d-1, t, p2) koch if d == 0:
        return d
    #calc s, u, t from p1, p2
     d == 0 d 0 return d d s_x = (2*p1[0]+1 * p2[0]) / 3 s_x (2*p1[0]+1 * p2[0]) / 3 2*p1[0]+1 * p2[0] 2*p1[0] 2 p1[0] p1 0 1 * p2[0] 1 p2[0] p2 0 3 s_y = (2*p1[1]+1 * p2[1]) / 3 s_y (2*p1[1]+1 * p2[1]) / 3 2*p1[1]+1 * p2[1] 2*p1[1] 2 p1[1] p1 1 1 * p2[1] 1 p2[1] p2 1 3 s = (s_x, s_y) s (s_x, s_y) s_x s_y t_x = (1*p1[0]+2 * p2[0]) / 3 t_x (1*p1[0]+2 * p2[0]) / 3 1*p1[0]+2 * p2[0] 1*p1[0] 1 p1[0] p1 0 2 * p2[0] 2 p2[0] p2 0 3 t_y = (1*p1[1]+2 * p2[1]) / 3 t_y (1*p1[1]+2 * p2[1]) / 3 1*p1[1]+2 * p2[1] 1*p1[1] 1 p1[1] p1 1 2 * p2[1] 2 p2[1] p2 1 3 t = (t_x, t_y) t (t_x, t_y) t_x t_y u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x u_x (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) (t_x - s_x)*math.cos(dig_six) t_x - s_x t_x s_x math.cos(dig_six) math.cos math cos dig_six (t_y - s_y)*math.sin(dig_six) t_y - s_y t_y s_y math.sin(dig_six) math.sin math sin dig_six s_x u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y u_y (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) (t_x - s_x)*math.sin(dig_six) t_x - s_x t_x s_x math.sin(dig_six) math.sin math sin dig_six (t_y - s_y)*math.cos(dig_six) t_y - s_y t_y s_y math.cos(dig_six) math.cos math cos dig_six s_y u = (u_x, u_y) u (u_x, u_y) u_x u_y koch(d-1, p1, s) koch d-1 d 1 p1 s str(x) for x in s for x in s x s for x in s str(x) str x print (' '.join([str(x) for x in s])) print ' '.join([str(x) for x in s]) ' '.join ' ' join [str(x) for x in s] koch(d-1, s, u) koch d-1 d 1 s u str(x) for x in u for x in u x u for x in u str(x) str x print (' '.join([str(x) for x in u])) print ' '.join([str(x) for x in u]) ' '.join ' ' join [str(x) for x in u] koch(d-1, u, t) koch d-1 d 1 u t str(x) for x in t for x in t x t for x in t str(x) str x print (' '.join([str(x) for x in t])) print ' '.join([str(x) for x in t]) ' '.join ' ' join [str(x) for x in t] koch(d-1, t, p2) koch d-1 d 1 t p2 d d p1 p1 p2 p2 if __name__ == '__main__':
    iterate = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print (' '.join([str(x) for x in p1]))
    koch(iterate, p1, p2)
    print (' '.join([str(x) for x in p2])) __name__ == '__main__' __name__ '__main__' iterate = int(input()) iterate int(input()) int input() input p1 = (0.0, 0.0) p1 (0.0, 0.0) 0.0 0.0 p2 = (100.0, 0.0) p2 (100.0, 0.0) 100.0 0.0 str(x) for x in p1 for x in p1 x p1 for x in p1 str(x) str x print (' '.join([str(x) for x in p1])) print ' '.join([str(x) for x in p1]) ' '.join ' ' join [str(x) for x in p1] koch(iterate, p1, p2) koch iterate p1 p2 str(x) for x in p2 for x in p2 x p2 for x in p2 str(x) str x print (' '.join([str(x) for x in p2])) print ' '.join([str(x) for x in p2]) ' '.join ' ' join [str(x) for x in p2] def koch(d, p1, p2):
    if d == 0:
        return d
    #calc s, u, t from p1, p2
    s_x = (2*p1[0]+1 * p2[0]) / 3
    s_y = (2*p1[1]+1 * p2[1]) / 3
    s = (s_x, s_y)
    t_x = (1*p1[0]+2 * p2[0]) / 3
    t_y = (1*p1[1]+2 * p2[1]) / 3
    t = (t_x, t_y)
    u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x
    u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y
    u = (u_x, u_y)
    
    koch(d-1, p1, s)
    print (' '.join([str(x) for x in s]))
    koch(d-1, s, u)
    print (' '.join([str(x) for x in u]))
    koch(d-1, u, t)
    print (' '.join([str(x) for x in t]))
    koch(d-1, t, p2) def koch(d, p1, p2):
    if d == 0:
        return d
    #calc s, u, t from p1, p2
    s_x = (2*p1[0]+1 * p2[0]) / 3
    s_y = (2*p1[1]+1 * p2[1]) / 3
    s = (s_x, s_y)
    t_x = (1*p1[0]+2 * p2[0]) / 3
    t_y = (1*p1[1]+2 * p2[1]) / 3
    t = (t_x, t_y)
    u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x
    u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y
    u = (u_x, u_y)
    
    koch(d-1, p1, s)
    print (' '.join([str(x) for x in s]))
    koch(d-1, s, u)
    print (' '.join([str(x) for x in u]))
    koch(d-1, u, t)
    print (' '.join([str(x) for x in t]))
    koch(d-1, t, p2) koch iterate = int(input()) int(input()) iterate p2 = (100.0, 0.0) (100.0, 0.0) p2 dig_six = math.radians(60) math.radians(60) dig_six p1 = (0.0, 0.0) (0.0, 0.0) p1
import math
dig_six = math.radians(60)

def koch(d, p1, p2):
    if d == 0:
        return d
    #calc s, u, t from p1, p2
    s_x = (2*p1[0]+1 * p2[0]) / 3
    s_y = (2*p1[1]+1 * p2[1]) / 3
    s = (s_x, s_y)
    t_x = (1*p1[0]+2 * p2[0]) / 3
    t_y = (1*p1[1]+2 * p2[1]) / 3
    t = (t_x, t_y)
    u_x = (t_x - s_x)*math.cos(dig_six) - (t_y - s_y)*math.sin(dig_six) + s_x
    u_y = (t_x - s_x)*math.sin(dig_six) + (t_y - s_y)*math.cos(dig_six) + s_y
    u = (u_x, u_y)
    
    koch(d-1, p1, s)
    print (' '.join([str(x) for x in s]))
    koch(d-1, s, u)
    print (' '.join([str(x) for x in u]))
    koch(d-1, u, t)
    print (' '.join([str(x) for x in t]))
    koch(d-1, t, p2)

if __name__ == '__main__':
    iterate = int(input())
    p1 = (0.0, 0.0)
    p2 = (100.0, 0.0)
    print (' '.join([str(x) for x in p1]))
    koch(iterate, p1, p2)
    print (' '.join([str(x) for x in p2]))
