class Point:
    def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y


def solve(p1, p2):
    s_x = p1.x + (p2.x - p1.x) * (1/3)
    s_y = p1.y + (p2.y - p1.y) * (1/3)
    t_x = p1.x + (p2.x - p1.x) * (2/3)
    t_y = p1.y + (p2.y - p1.y) * (2/3)
    u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2)
    u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2)
    s = Point(s_x, s_y)
    t = Point(t_x, t_y)
    u = Point(u_x, u_y)
    return [s, u, t]


if __name__ == "__main__":
    n = int(input())
    P = [Point(0, 0), Point(100, 0)]
    for i in range(n):
        TMP = []
        for j in range(len(P) - 1):
            TMP.append(P[j])
            TMP += solve(P[j], P[j+1])
        TMP.append(P[-1])
        P = TMP

    for p in P:
        print('{} {}'.format(p.x, p.y))
 class Point:
    def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y Point def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y __init__ super().__init__() ().__init__ () super __init__ self.x = x self.x self x x self.y = y self.y self y y self self x x y y def solve(p1, p2):
    s_x = p1.x + (p2.x - p1.x) * (1/3)
    s_y = p1.y + (p2.y - p1.y) * (1/3)
    t_x = p1.x + (p2.x - p1.x) * (2/3)
    t_y = p1.y + (p2.y - p1.y) * (2/3)
    u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2)
    u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2)
    s = Point(s_x, s_y)
    t = Point(t_x, t_y)
    u = Point(u_x, u_y)
    return [s, u, t] solve s_x = p1.x + (p2.x - p1.x) * (1/3) s_x p1.x + (p2.x - p1.x) * (1/3) p1.x p1 x (p2.x - p1.x) * (1/3) p2.x - p1.x p2.x p2 x p1.x p1 x 1/3 1 3 s_y = p1.y + (p2.y - p1.y) * (1/3) s_y p1.y + (p2.y - p1.y) * (1/3) p1.y p1 y (p2.y - p1.y) * (1/3) p2.y - p1.y p2.y p2 y p1.y p1 y 1/3 1 3 t_x = p1.x + (p2.x - p1.x) * (2/3) t_x p1.x + (p2.x - p1.x) * (2/3) p1.x p1 x (p2.x - p1.x) * (2/3) p2.x - p1.x p2.x p2 x p1.x p1 x 2/3 2 3 t_y = p1.y + (p2.y - p1.y) * (2/3) t_y p1.y + (p2.y - p1.y) * (2/3) p1.y p1 y (p2.y - p1.y) * (2/3) p2.y - p1.y p2.y p2 y p1.y p1 y 2/3 2 3 u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2) u_x (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2) (p2.x + p1.x) * (1/2) p2.x + p1.x p2.x p2 x p1.x p1 x 1/2 1 2 (p1.y - p2.y) * (1/6) * pow(3, 1/2) (p1.y - p2.y) * (1/6) p1.y - p2.y p1.y p1 y p2.y p2 y 1/6 1 6 pow(3, 1/2) pow 3 1/2 1 2 u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2) u_y (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2) (p2.y + p1.y) * (1/2) p2.y + p1.y p2.y p2 y p1.y p1 y 1/2 1 2 (p2.x - p1.x) * (1/6) * pow(3, 1/2) (p2.x - p1.x) * (1/6) p2.x - p1.x p2.x p2 x p1.x p1 x 1/6 1 6 pow(3, 1/2) pow 3 1/2 1 2 s = Point(s_x, s_y) s Point(s_x, s_y) Point s_x s_y t = Point(t_x, t_y) t Point(t_x, t_y) Point t_x t_y u = Point(u_x, u_y) u Point(u_x, u_y) Point u_x u_y return [s, u, t] [s, u, t] s u t p1 p1 p2 p2 if __name__ == "__main__":
    n = int(input())
    P = [Point(0, 0), Point(100, 0)]
    for i in range(n):
        TMP = []
        for j in range(len(P) - 1):
            TMP.append(P[j])
            TMP += solve(P[j], P[j+1])
        TMP.append(P[-1])
        P = TMP

    for p in P:
        print('{} {}'.format(p.x, p.y)) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input P = [Point(0, 0), Point(100, 0)] P [Point(0, 0), Point(100, 0)] Point(0, 0) Point 0 0 Point(100, 0) Point 100 0 for i in range(n):
        TMP = []
        for j in range(len(P) - 1):
            TMP.append(P[j])
            TMP += solve(P[j], P[j+1])
        TMP.append(P[-1])
        P = TMP

     i range(n) range n TMP = [] TMP [] for j in range(len(P) - 1):
            TMP.append(P[j])
            TMP += solve(P[j], P[j+1])
         j range(len(P) - 1) range len(P) - 1 len(P) len P 1 TMP.append(P[j]) TMP.append TMP append P[j] P j TMP += solve(P[j], P[j+1]) TMP solve(P[j], P[j+1]) solve P[j] P j P[j+1] P j+1 j 1 TMP.append(P[-1]) TMP.append TMP append P[-1] P -1 P = TMP P TMP for p in P:
        print('{} {}'.format(p.x, p.y)) p P print('{} {}'.format(p.x, p.y)) print '{} {}'.format(p.x, p.y) '{} {}'.format '{} {}' format p.x p x p.y p y P = [Point(0, 0), Point(100, 0)] [Point(0, 0), Point(100, 0)] P class Point:
    def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y class Point:
    def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y Point def solve(p1, p2):
    s_x = p1.x + (p2.x - p1.x) * (1/3)
    s_y = p1.y + (p2.y - p1.y) * (1/3)
    t_x = p1.x + (p2.x - p1.x) * (2/3)
    t_y = p1.y + (p2.y - p1.y) * (2/3)
    u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2)
    u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2)
    s = Point(s_x, s_y)
    t = Point(t_x, t_y)
    u = Point(u_x, u_y)
    return [s, u, t] def solve(p1, p2):
    s_x = p1.x + (p2.x - p1.x) * (1/3)
    s_y = p1.y + (p2.y - p1.y) * (1/3)
    t_x = p1.x + (p2.x - p1.x) * (2/3)
    t_y = p1.y + (p2.y - p1.y) * (2/3)
    u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2)
    u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2)
    s = Point(s_x, s_y)
    t = Point(t_x, t_y)
    u = Point(u_x, u_y)
    return [s, u, t] solve TMP += solve(P[j], P[j+1]) solve(P[j], P[j+1]) TMP n = int(input()) int(input()) n P = TMP TMP P TMP = [] [] TMP
class Point:
    def __init__(self, x, y):
        super().__init__()
        self.x = x
        self.y = y


def solve(p1, p2):
    s_x = p1.x + (p2.x - p1.x) * (1/3)
    s_y = p1.y + (p2.y - p1.y) * (1/3)
    t_x = p1.x + (p2.x - p1.x) * (2/3)
    t_y = p1.y + (p2.y - p1.y) * (2/3)
    u_x = (p2.x + p1.x) * (1/2) + (p1.y - p2.y) * (1/6) * pow(3, 1/2)
    u_y = (p2.y + p1.y) * (1/2) + (p2.x - p1.x) * (1/6) * pow(3, 1/2)
    s = Point(s_x, s_y)
    t = Point(t_x, t_y)
    u = Point(u_x, u_y)
    return [s, u, t]


if __name__ == "__main__":
    n = int(input())
    P = [Point(0, 0), Point(100, 0)]
    for i in range(n):
        TMP = []
        for j in range(len(P) - 1):
            TMP.append(P[j])
            TMP += solve(P[j], P[j+1])
        TMP.append(P[-1])
        P = TMP

    for p in P:
        print('{} {}'.format(p.x, p.y))

