def koch_divide(p,q):
    v = [q[0]-p[0], q[1]-p[1]]
    s = [p[0]+v[0]/3, p[1]+v[1]/3]
    t = [q[0]-v[0]/3, q[1]-v[1]/3]
    u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5]
    return [s,u,t,q]

def koch_curve(previous):
    vertices = [previous[0]]
    for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
    return vertices

if __name__=='__main__':
    p_q = [[0.0, 0.0], [100.0, 0.0]]
    n = int(input())
    for _ in range(n):
        p_q = koch_curve(p_q)
    for vertex in p_q:
        print(" ".join(['{:.8f}'.format(x) for x in vertex])) def koch_divide(p,q):
    v = [q[0]-p[0], q[1]-p[1]]
    s = [p[0]+v[0]/3, p[1]+v[1]/3]
    t = [q[0]-v[0]/3, q[1]-v[1]/3]
    u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5]
    return [s,u,t,q] koch_divide v = [q[0]-p[0], q[1]-p[1]] v [q[0]-p[0], q[1]-p[1]] q[0]-p[0] q[0] q 0 p[0] p 0 q[1]-p[1] q[1] q 1 p[1] p 1 s = [p[0]+v[0]/3, p[1]+v[1]/3] s [p[0]+v[0]/3, p[1]+v[1]/3] p[0]+v[0]/3 p[0] p 0 v[0]/3 v[0] v 0 3 p[1]+v[1]/3 p[1] p 1 v[1]/3 v[1] v 1 3 t = [q[0]-v[0]/3, q[1]-v[1]/3] t [q[0]-v[0]/3, q[1]-v[1]/3] q[0]-v[0]/3 q[0] q 0 v[0]/3 v[0] v 0 3 q[1]-v[1]/3 q[1] q 1 v[1]/3 v[1] v 1 3 u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5] u [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5] p[0]+v[0]*0.5-v[1]*0.288675 p[0]+v[0]*0.5 p[0] p 0 v[0]*0.5 v[0] v 0 0.5 v[1]*0.288675 v[1] v 1 0.288675 p[1]+v[0]*0.288675+v[1]*0.5 p[1]+v[0]*0.288675 p[1] p 1 v[0]*0.288675 v[0] v 0 0.288675 v[1]*0.5 v[1] v 1 0.5 return [s,u,t,q] [s,u,t,q] s u t q p p q q def koch_curve(previous):
    vertices = [previous[0]]
    for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
    return vertices koch_curve vertices = [previous[0]] vertices [previous[0]] previous[0] previous 0 for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
     p q zip(previous[:-1], previous[1:]) zip previous[:-1] previous :-1 -1 previous[1:] previous 1: 1 vertices.extend(koch_divide(p,q)) vertices.extend vertices extend koch_divide(p,q) koch_divide p q return vertices vertices previous previous if __name__=='__main__':
    p_q = [[0.0, 0.0], [100.0, 0.0]]
    n = int(input())
    for _ in range(n):
        p_q = koch_curve(p_q)
    for vertex in p_q:
        print(" ".join(['{:.8f}'.format(x) for x in vertex])) __name__=='__main__' __name__ '__main__' p_q = [[0.0, 0.0], [100.0, 0.0]] p_q [[0.0, 0.0], [100.0, 0.0]] [0.0, 0.0] 0.0 0.0 [100.0, 0.0] 100.0 0.0 n = int(input()) n int(input()) int input() input for _ in range(n):
        p_q = koch_curve(p_q)
     _ range(n) range n p_q = koch_curve(p_q) p_q koch_curve(p_q) koch_curve p_q for vertex in p_q:
        print(" ".join(['{:.8f}'.format(x) for x in vertex])) vertex p_q '{:.8f}'.format(x) for x in vertex for x in vertex x vertex for x in vertex '{:.8f}'.format(x) '{:.8f}'.format '{:.8f}' format x print(" ".join(['{:.8f}'.format(x) for x in vertex])) print " ".join(['{:.8f}'.format(x) for x in vertex]) " ".join " " join ['{:.8f}'.format(x) for x in vertex] def koch_divide(p,q):
    v = [q[0]-p[0], q[1]-p[1]]
    s = [p[0]+v[0]/3, p[1]+v[1]/3]
    t = [q[0]-v[0]/3, q[1]-v[1]/3]
    u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5]
    return [s,u,t,q] def koch_divide(p,q):
    v = [q[0]-p[0], q[1]-p[1]]
    s = [p[0]+v[0]/3, p[1]+v[1]/3]
    t = [q[0]-v[0]/3, q[1]-v[1]/3]
    u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5]
    return [s,u,t,q] koch_divide def koch_curve(previous):
    vertices = [previous[0]]
    for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
    return vertices def koch_curve(previous):
    vertices = [previous[0]]
    for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
    return vertices koch_curve p_q = [[0.0, 0.0], [100.0, 0.0]] [[0.0, 0.0], [100.0, 0.0]] p_q p_q = koch_curve(p_q) koch_curve(p_q) p_q n = int(input()) int(input()) n
def koch_divide(p,q):
    v = [q[0]-p[0], q[1]-p[1]]
    s = [p[0]+v[0]/3, p[1]+v[1]/3]
    t = [q[0]-v[0]/3, q[1]-v[1]/3]
    u = [p[0]+v[0]*0.5-v[1]*0.288675, p[1]+v[0]*0.288675+v[1]*0.5]
    return [s,u,t,q]

def koch_curve(previous):
    vertices = [previous[0]]
    for p,q in zip(previous[:-1], previous[1:]):
        vertices.extend(koch_divide(p,q))
    return vertices

if __name__=='__main__':
    p_q = [[0.0, 0.0], [100.0, 0.0]]
    n = int(input())
    for _ in range(n):
        p_q = koch_curve(p_q)
    for vertex in p_q:
        print(" ".join(['{:.8f}'.format(x) for x in vertex]))