import math


def rot60_on_complex_plane(start: complex, end: complex) -> complex:
    v = end - start
    arg = 1 / 2 + complex(0, (math.sqrt(3) / 2))
    return v * arg + start


def print_real_coordinate(z: complex) -> None:
    x = z.real
    y = z.imag
    print(f"{x:.8f} {y:.8f}")


def create_koch_points(p1: complex, p2: complex, n: int) -> None:
    if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
    s = (p2 - p1) * (1 / 3) + p1
    t = (p2 - p1) * (2 / 3) + p1
    u = rot60_on_complex_plane(s, t)

    # Call the function recursively by the case of n == 0.
    create_koch_points(p1, s, n - 1)
    print_real_coordinate(s)
    create_koch_points(s, u, n - 1)
    print_real_coordinate(u)
    create_koch_points(u, t, n - 1)
    print_real_coordinate(t)
    create_koch_points(t, p2, n - 1)


if __name__ == "__main__":
    n = int(input())
    start_point = (0 + 0j)
    end_point = (100 + 0j)

    print_real_coordinate(start_point)
    create_koch_points(start_point, end_point, n)
    print_real_coordinate(end_point)
 import math math def rot60_on_complex_plane(start: complex, end: complex) -> complex:
    v = end - start
    arg = 1 / 2 + complex(0, (math.sqrt(3) / 2))
    return v * arg + start rot60_on_complex_plane v = end - start v end - start end start arg = 1 / 2 + complex(0, (math.sqrt(3) / 2)) arg 1 / 2 + complex(0, (math.sqrt(3) / 2)) 1 / 2 1 2 complex(0, (math.sqrt(3) / 2)) complex 0 math.sqrt(3) / 2 math.sqrt(3) math.sqrt math sqrt 3 2 return v * arg + start v * arg + start v * arg v arg start start: complex start end: complex end def print_real_coordinate(z: complex) -> None:
    x = z.real
    y = z.imag
    print(f"{x:.8f} {y:.8f}") print_real_coordinate x = z.real x z.real z real y = z.imag y z.imag z imag print(f"{x:.8f} {y:.8f}") print f"{x:.8f} {y:.8f}" z: complex z def create_koch_points(p1: complex, p2: complex, n: int) -> None:
    if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
    s = (p2 - p1) * (1 / 3) + p1
    t = (p2 - p1) * (2 / 3) + p1
    u = rot60_on_complex_plane(s, t)

    # Call the function recursively by the case of n == 0.
    create_koch_points(p1, s, n - 1)
    print_real_coordinate(s)
    create_koch_points(s, u, n - 1)
    print_real_coordinate(u)
    create_koch_points(u, t, n - 1)
    print_real_coordinate(t)
    create_koch_points(t, p2, n - 1) create_koch_points if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
     n == 0 n 0 return s = (p2 - p1) * (1 / 3) + p1 s (p2 - p1) * (1 / 3) + p1 (p2 - p1) * (1 / 3) p2 - p1 p2 p1 1 / 3 1 3 p1 t = (p2 - p1) * (2 / 3) + p1 t (p2 - p1) * (2 / 3) + p1 (p2 - p1) * (2 / 3) p2 - p1 p2 p1 2 / 3 2 3 p1 u = rot60_on_complex_plane(s, t) u rot60_on_complex_plane(s, t) rot60_on_complex_plane s t create_koch_points(p1, s, n - 1) create_koch_points p1 s n - 1 n 1 print_real_coordinate(s) print_real_coordinate s create_koch_points(s, u, n - 1) create_koch_points s u n - 1 n 1 print_real_coordinate(u) print_real_coordinate u create_koch_points(u, t, n - 1) create_koch_points u t n - 1 n 1 print_real_coordinate(t) print_real_coordinate t create_koch_points(t, p2, n - 1) create_koch_points t p2 n - 1 n 1 p1: complex p1 p2: complex p2 n: int n if __name__ == "__main__":
    n = int(input())
    start_point = (0 + 0j)
    end_point = (100 + 0j)

    print_real_coordinate(start_point)
    create_koch_points(start_point, end_point, n)
    print_real_coordinate(end_point) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input start_point = (0 + 0j) start_point 0 + 0j 0 0j end_point = (100 + 0j) end_point 100 + 0j 100 0j print_real_coordinate(start_point) print_real_coordinate start_point create_koch_points(start_point, end_point, n) create_koch_points start_point end_point n print_real_coordinate(end_point) print_real_coordinate end_point def rot60_on_complex_plane(start: complex, end: complex) -> complex:
    v = end - start
    arg = 1 / 2 + complex(0, (math.sqrt(3) / 2))
    return v * arg + start def rot60_on_complex_plane(start: complex, end: complex) -> complex:
    v = end - start
    arg = 1 / 2 + complex(0, (math.sqrt(3) / 2))
    return v * arg + start rot60_on_complex_plane end_point = (100 + 0j) 100 + 0j end_point def create_koch_points(p1: complex, p2: complex, n: int) -> None:
    if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
    s = (p2 - p1) * (1 / 3) + p1
    t = (p2 - p1) * (2 / 3) + p1
    u = rot60_on_complex_plane(s, t)

    # Call the function recursively by the case of n == 0.
    create_koch_points(p1, s, n - 1)
    print_real_coordinate(s)
    create_koch_points(s, u, n - 1)
    print_real_coordinate(u)
    create_koch_points(u, t, n - 1)
    print_real_coordinate(t)
    create_koch_points(t, p2, n - 1) def create_koch_points(p1: complex, p2: complex, n: int) -> None:
    if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
    s = (p2 - p1) * (1 / 3) + p1
    t = (p2 - p1) * (2 / 3) + p1
    u = rot60_on_complex_plane(s, t)

    # Call the function recursively by the case of n == 0.
    create_koch_points(p1, s, n - 1)
    print_real_coordinate(s)
    create_koch_points(s, u, n - 1)
    print_real_coordinate(u)
    create_koch_points(u, t, n - 1)
    print_real_coordinate(t)
    create_koch_points(t, p2, n - 1) create_koch_points def print_real_coordinate(z: complex) -> None:
    x = z.real
    y = z.imag
    print(f"{x:.8f} {y:.8f}") def print_real_coordinate(z: complex) -> None:
    x = z.real
    y = z.imag
    print(f"{x:.8f} {y:.8f}") print_real_coordinate n = int(input()) int(input()) n start_point = (0 + 0j) 0 + 0j start_point
import math


def rot60_on_complex_plane(start: complex, end: complex) -> complex:
    v = end - start
    arg = 1 / 2 + complex(0, (math.sqrt(3) / 2))
    return v * arg + start


def print_real_coordinate(z: complex) -> None:
    x = z.real
    y = z.imag
    print(f"{x:.8f} {y:.8f}")


def create_koch_points(p1: complex, p2: complex, n: int) -> None:
    if n == 0:
        return

    # Get s, t, u coordinates on the complex plane.
    s = (p2 - p1) * (1 / 3) + p1
    t = (p2 - p1) * (2 / 3) + p1
    u = rot60_on_complex_plane(s, t)

    # Call the function recursively by the case of n == 0.
    create_koch_points(p1, s, n - 1)
    print_real_coordinate(s)
    create_koch_points(s, u, n - 1)
    print_real_coordinate(u)
    create_koch_points(u, t, n - 1)
    print_real_coordinate(t)
    create_koch_points(t, p2, n - 1)


if __name__ == "__main__":
    n = int(input())
    start_point = (0 + 0j)
    end_point = (100 + 0j)

    print_real_coordinate(start_point)
    create_koch_points(start_point, end_point, n)
    print_real_coordinate(end_point)

