def koch_curve(points, n):
    if n == 0:
        return points
    result = []
    for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
    result.append(points.pop())
    return koch_curve(result, n - 1)

n = int(input())
for point in koch_curve([[0.0, 0.0], [100.0, 0.0]], n):
    print(*map(str, point)) def koch_curve(points, n):
    if n == 0:
        return points
    result = []
    for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
    result.append(points.pop())
    return koch_curve(result, n - 1) koch_curve if n == 0:
        return points
     n == 0 n 0 return points points result = [] result [] for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
     i range(len(points) - 1) range len(points) - 1 len(points) len points 1 x = points[i+1][0] - points[i][0] x points[i+1][0] - points[i][0] points[i+1][0] [i+1] points i+1 i 1 0 points[i][0] [i] points i 0 y = points[i+1][1] - points[i][1] y points[i+1][1] - points[i][1] points[i+1][1] [i+1] points i+1 i 1 1 points[i][1] [i] points i 1 s = [points[i][0]+x/3, points[i][1]+y/3] s [points[i][0]+x/3, points[i][1]+y/3] points[i][0]+x/3 points[i][0] [i] points i 0 x/3 x 3 points[i][1]+y/3 points[i][1] [i] points i 1 y/3 y 3 t = [points[i][0]+2*x/3, points[i][1]+2*y/3] t [points[i][0]+2*x/3, points[i][1]+2*y/3] points[i][0]+2*x/3 points[i][0] [i] points i 0 2*x/3 2*x 2 x 3 points[i][1]+2*y/3 points[i][1] [i] points i 1 2*y/3 2*y 2 y 3 u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2 u_x t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2 t[0]/2 - t[1]*(3**0.5/2) + s[0]/2 t[0]/2 - t[1]*(3**0.5/2) t[0]/2 t[0] t 0 2 t[1]*(3**0.5/2) t[1] t 1 3**0.5/2 3**0.5 3 0.5 2 s[0]/2 s[0] s 0 2 (3**0.5)*s[1]/2 (3**0.5)*s[1] 3**0.5 3 0.5 s[1] s 1 2 u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2 u_y t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2 t[0]*3**0.5/2 + t[1]/2 + s[1]/2 t[0]*3**0.5/2 + t[1]/2 t[0]*3**0.5/2 t[0]*3**0.5 t[0] t 0 3**0.5 3 0.5 2 t[1]/2 t[1] t 1 2 s[1]/2 s[1] s 1 2 (3**0.5)*s[0]/2 (3**0.5)*s[0] 3**0.5 3 0.5 s[0] s 0 2 u = [u_x, u_y] u [u_x, u_y] u_x u_y result.extend([points[i], s, u, t]) result.extend result extend [points[i], s, u, t] points[i] points i s u t result.append(points.pop()) result.append result append points.pop() points.pop points pop return koch_curve(result, n - 1) koch_curve(result, n - 1) koch_curve result n - 1 n 1 points points n n n = int(input()) n int(input()) int input() input for point in koch_curve([[0.0, 0.0], [100.0, 0.0]], n):
    print(*map(str, point)) point koch_curve([[0.0, 0.0], [100.0, 0.0]], n) koch_curve [[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 print(*map(str, point)) print *map(str, point) map(str, point) map str point def koch_curve(points, n):
    if n == 0:
        return points
    result = []
    for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
    result.append(points.pop())
    return koch_curve(result, n - 1) def koch_curve(points, n):
    if n == 0:
        return points
    result = []
    for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
    result.append(points.pop())
    return koch_curve(result, n - 1) koch_curve n = int(input()) int(input()) n
def koch_curve(points, n):
    if n == 0:
        return points
    result = []
    for i in range(len(points) - 1):
        x = points[i+1][0] - points[i][0]
        y = points[i+1][1] - points[i][1]
        s = [points[i][0]+x/3, points[i][1]+y/3]
        t = [points[i][0]+2*x/3, points[i][1]+2*y/3]
        u_x = t[0]/2 - t[1]*(3**0.5/2) + s[0]/2+(3**0.5)*s[1]/2
        u_y = t[0]*3**0.5/2 + t[1]/2 + s[1]/2-(3**0.5)*s[0]/2
        u = [u_x, u_y]
        result.extend([points[i], s, u, t])
    result.append(points.pop())
    return koch_curve(result, n - 1)

n = int(input())
for point in koch_curve([[0.0, 0.0], [100.0, 0.0]], n):
    print(*map(str, point))