def devide2points(p1,p2):
    s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3)
    t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3)
    u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6)
    return [s,u,t]

def divide(points):
    res = [points[0]]
    for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
    return res

n = int(input())
points = [(0.0,0.0),(100.0,0.0)]
for _ in range(n):
    points = divide(points)
for i in points:
    print(i[0],i[1]) def devide2points(p1,p2):
    s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3)
    t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3)
    u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6)
    return [s,u,t] devide2points s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3) s ((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3) (p1[0]*2+p2[0])/3 p1[0]*2+p2[0] p1[0]*2 p1[0] p1 0 2 p2[0] p2 0 3 (p1[1]*2+p2[1])/3 p1[1]*2+p2[1] p1[1]*2 p1[1] p1 1 2 p2[1] p2 1 3 t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3) t ((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3) (p1[0]+p2[0]*2)/3 p1[0]+p2[0]*2 p1[0] p1 0 p2[0]*2 p2[0] p2 0 2 3 (p1[1]+p2[1]*2)/3 p1[1]+p2[1]*2 p1[1] p1 1 p2[1]*2 p2[1] p2 1 2 3 u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6) u ((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6) (p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6 (p1[0]+p2[0])/2 p1[0]+p2[0] p1[0] p1 0 p2[0] p2 0 2 (p2[1]-p1[1])*(3**(1/2))/6 (p2[1]-p1[1])*(3**(1/2)) p2[1]-p1[1] p2[1] p2 1 p1[1] p1 1 3**(1/2) 3 1/2 1 2 6 (p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6 (p1[1]+p2[1])/2 p1[1]+p2[1] p1[1] p1 1 p2[1] p2 1 2 (p2[0]-p1[0])*(3**(1/2))/6 (p2[0]-p1[0])*(3**(1/2)) p2[0]-p1[0] p2[0] p2 0 p1[0] p1 0 3**(1/2) 3 1/2 1 2 6 return [s,u,t] [s,u,t] s u t p1 p1 p2 p2 def divide(points):
    res = [points[0]]
    for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
    return res divide res = [points[0]] res [points[0]] points[0] points 0 for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
     i range(len(points)-1) range len(points)-1 len(points) len points 1 res = res + devide2points(points[i],points[i+1]) + [points[i+1]] res res + devide2points(points[i],points[i+1]) + [points[i+1]] res + devide2points(points[i],points[i+1]) res devide2points(points[i],points[i+1]) devide2points points[i] points i points[i+1] points i+1 i 1 [points[i+1]] points[i+1] points i+1 i 1 return res res points points n = int(input()) n int(input()) int input() input points = [(0.0,0.0),(100.0,0.0)] points [(0.0,0.0),(100.0,0.0)] (0.0,0.0) 0.0 0.0 (100.0,0.0) 100.0 0.0 for _ in range(n):
    points = divide(points) _ range(n) range n points = divide(points) points divide(points) divide points for i in points:
    print(i[0],i[1]) i points print(i[0],i[1]) print i[0] i 0 i[1] i 1 points = divide(points) divide(points) points n = int(input()) int(input()) n points = [(0.0,0.0),(100.0,0.0)] [(0.0,0.0),(100.0,0.0)] points def devide2points(p1,p2):
    s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3)
    t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3)
    u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6)
    return [s,u,t] def devide2points(p1,p2):
    s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3)
    t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3)
    u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6)
    return [s,u,t] devide2points def divide(points):
    res = [points[0]]
    for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
    return res def divide(points):
    res = [points[0]]
    for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
    return res divide
def devide2points(p1,p2):
    s=((p1[0]*2+p2[0])/3,(p1[1]*2+p2[1])/3)
    t=((p1[0]+p2[0]*2)/3,(p1[1]+p2[1]*2)/3)
    u=((p1[0]+p2[0])/2-(p2[1]-p1[1])*(3**(1/2))/6,(p1[1]+p2[1])/2+(p2[0]-p1[0])*(3**(1/2))/6)
    return [s,u,t]

def divide(points):
    res = [points[0]]
    for i in range(len(points)-1):
        res = res + devide2points(points[i],points[i+1]) + [points[i+1]]
    return res

n = int(input())
points = [(0.0,0.0),(100.0,0.0)]
for _ in range(n):
    points = divide(points)
for i in points:
    print(i[0],i[1])
