from math import sin, cos, pi


class Point:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}"


def kock(n, p1: Point, p2: Point):
    if n == 0:
        return
    s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    )
    t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    )
    u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    )
    kock(n - 1, p1, s)
    print(s)
    kock(n - 1, s, u)
    print(u)
    kock(n - 1, u, t)
    print(t)
    kock(n - 1, t, p2)


def main():
    n = int(input())
    p1 = Point(0.0, 0.0)
    p2 = Point(100.0, 0.0)
    print(p1)
    kock(n, p1, p2)
    print(p2)

main() from math import sin, cos, pi class Point:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" Point def __init__(self, x, y):
        self.x = x
        self.y = y

     __init__ self.x = x self.x self x x self.y = y self.y self y y self self x x y y def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" __str__ return f"{self.x:.8f} {self.y:.8f}" f"{self.x:.8f} {self.y:.8f}" self self def kock(n, p1: Point, p2: Point):
    if n == 0:
        return
    s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    )
    t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    )
    u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    )
    kock(n - 1, p1, s)
    print(s)
    kock(n - 1, s, u)
    print(u)
    kock(n - 1, u, t)
    print(t)
    kock(n - 1, t, p2) kock if n == 0:
        return
     n == 0 n 0 return s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    ) s Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    ) Point x=(2*p1.x + p2.x)/3 x (2*p1.x + p2.x)/3 2*p1.x + p2.x 2*p1.x 2 p1.x p1 x p2.x p2 x 3 y=(2*p1.y + p2.y)/3 y (2*p1.y + p2.y)/3 2*p1.y + p2.y 2*p1.y 2 p1.y p1 y p2.y p2 y 3 t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    ) t Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    ) Point x=(p1.x + 2*p2.x)/3 x (p1.x + 2*p2.x)/3 p1.x + 2*p2.x p1.x p1 x 2*p2.x 2 p2.x p2 x 3 y=(p1.y + 2*p2.y)/3 y (p1.y + 2*p2.y)/3 p1.y + 2*p2.y p1.y p1 y 2*p2.y 2 p2.y p2 y 3 u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    ) u Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    ) Point x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x x (t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x (t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) (t.x - s.x) * cos(pi / 3) t.x - s.x t.x t x s.x s x cos(pi / 3) cos pi / 3 pi 3 (t.y - s.y) * sin(pi / 3) t.y - s.y t.y t y s.y s y sin(pi / 3) sin pi / 3 pi 3 s.x s x y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y y (t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y (t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) (t.x - s.x) * sin(pi / 3) t.x - s.x t.x t x s.x s x sin(pi / 3) sin pi / 3 pi 3 (t.y - s.y) * cos(pi / 3) t.y - s.y t.y t y s.y s y cos(pi / 3) cos pi / 3 pi 3 s.y s y kock(n - 1, p1, s) kock n - 1 n 1 p1 s print(s) print s kock(n - 1, s, u) kock n - 1 n 1 s u print(u) print u kock(n - 1, u, t) kock n - 1 n 1 u t print(t) print t kock(n - 1, t, p2) kock n - 1 n 1 t p2 n n p1: Point p1 p2: Point p2 def main():
    n = int(input())
    p1 = Point(0.0, 0.0)
    p2 = Point(100.0, 0.0)
    print(p1)
    kock(n, p1, p2)
    print(p2) main n = int(input()) n int(input()) int input() input p1 = Point(0.0, 0.0) p1 Point(0.0, 0.0) Point 0.0 0.0 p2 = Point(100.0, 0.0) p2 Point(100.0, 0.0) Point 100.0 0.0 print(p1) print p1 kock(n, p1, p2) kock n p1 p2 print(p2) print p2 main() main def kock(n, p1: Point, p2: Point):
    if n == 0:
        return
    s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    )
    t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    )
    u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    )
    kock(n - 1, p1, s)
    print(s)
    kock(n - 1, s, u)
    print(u)
    kock(n - 1, u, t)
    print(t)
    kock(n - 1, t, p2) def kock(n, p1: Point, p2: Point):
    if n == 0:
        return
    s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    )
    t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    )
    u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    )
    kock(n - 1, p1, s)
    print(s)
    kock(n - 1, s, u)
    print(u)
    kock(n - 1, u, t)
    print(t)
    kock(n - 1, t, p2) kock class Point:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" class Point:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" Point def main():
    n = int(input())
    p1 = Point(0.0, 0.0)
    p2 = Point(100.0, 0.0)
    print(p1)
    kock(n, p1, p2)
    print(p2) def main():
    n = int(input())
    p1 = Point(0.0, 0.0)
    p2 = Point(100.0, 0.0)
    print(p1)
    kock(n, p1, p2)
    print(p2) main
from math import sin, cos, pi


class Point:

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}"


def kock(n, p1: Point, p2: Point):
    if n == 0:
        return
    s = Point(
        x=(2*p1.x + p2.x)/3,
        y=(2*p1.y + p2.y)/3
    )
    t = Point(
        x=(p1.x + 2*p2.x)/3,
        y=(p1.y + 2*p2.y)/3
    )
    u = Point(
        x=(t.x - s.x) * cos(pi / 3) - (t.y - s.y) * sin(pi / 3) + s.x,
        y=(t.x - s.x) * sin(pi / 3) + (t.y - s.y) * cos(pi / 3) + s.y
    )
    kock(n - 1, p1, s)
    print(s)
    kock(n - 1, s, u)
    print(u)
    kock(n - 1, u, t)
    print(t)
    kock(n - 1, t, p2)


def main():
    n = int(input())
    p1 = Point(0.0, 0.0)
    p2 = Point(100.0, 0.0)
    print(p1)
    kock(n, p1, p2)
    print(p2)

main()
