import math

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

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


def koch(d, l, r):
    if d == 0:
        return

    s = Point()
    t = Point()
    u = Point()
    s.x = (2*l.x + 1*r.x) / (1 + 2)
    s.y = (2*l.y + 1*r.y) / (1 + 2)
    t.x = (1*l.x + 2*r.x) / (2 + 1)
    t.y = (1*l.y + 2*r.y) / (2 + 1)
    u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x
    u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y

    koch(d - 1, l, s)
    print(s)
    koch(d - 1, s, u)
    print(u)
    koch(d - 1, u, t)
    print(t)
    koch(d - 1, t, r)

n = int(input())
l, r = Point(), Point(100.0, 0.0)
print(l)
koch(n, l, r)
print(r) import math math class Point:
    def __init__(self, x = 0.0, y = 0.0):
        self.x = x
        self.y = y

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" Point def __init__(self, x = 0.0, y = 0.0):
        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 = 0.0 x 0.0 y = 0.0 y 0.0 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 koch(d, l, r):
    if d == 0:
        return

    s = Point()
    t = Point()
    u = Point()
    s.x = (2*l.x + 1*r.x) / (1 + 2)
    s.y = (2*l.y + 1*r.y) / (1 + 2)
    t.x = (1*l.x + 2*r.x) / (2 + 1)
    t.y = (1*l.y + 2*r.y) / (2 + 1)
    u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x
    u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y

    koch(d - 1, l, s)
    print(s)
    koch(d - 1, s, u)
    print(u)
    koch(d - 1, u, t)
    print(t)
    koch(d - 1, t, r) koch if d == 0:
        return

     d == 0 d 0 return s = Point() s Point() Point t = Point() t Point() Point u = Point() u Point() Point s.x = (2*l.x + 1*r.x) / (1 + 2) s.x s x (2*l.x + 1*r.x) / (1 + 2) 2*l.x + 1*r.x 2*l.x 2 l.x l x 1*r.x 1 r.x r x 1 + 2 1 2 s.y = (2*l.y + 1*r.y) / (1 + 2) s.y s y (2*l.y + 1*r.y) / (1 + 2) 2*l.y + 1*r.y 2*l.y 2 l.y l y 1*r.y 1 r.y r y 1 + 2 1 2 t.x = (1*l.x + 2*r.x) / (2 + 1) t.x t x (1*l.x + 2*r.x) / (2 + 1) 1*l.x + 2*r.x 1*l.x 1 l.x l x 2*r.x 2 r.x r x 2 + 1 2 1 t.y = (1*l.y + 2*r.y) / (2 + 1) t.y t y (1*l.y + 2*r.y) / (2 + 1) 1*l.y + 2*r.y 1*l.y 1 l.y l y 2*r.y 2 r.y r y 2 + 1 2 1 u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x u.x u x (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) (t.x - s.x) * math.cos(math.radians(60)) t.x - s.x t.x t x s.x s x math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 (t.y - s.y) * math.sin(math.radians(60)) t.y - s.y t.y t y s.y s y math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 s.x s x u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y u.y u y (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) (t.x - s.x) * math.sin(math.radians(60)) t.x - s.x t.x t x s.x s x math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 (t.y - s.y) * math.cos(math.radians(60)) t.y - s.y t.y t y s.y s y math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 s.y s y koch(d - 1, l, s) koch d - 1 d 1 l s print(s) print s koch(d - 1, s, u) koch d - 1 d 1 s u print(u) print u koch(d - 1, u, t) koch d - 1 d 1 u t print(t) print t koch(d - 1, t, r) koch d - 1 d 1 t r d d l l r r n = int(input()) n int(input()) int input() input l, r = Point(), Point(100.0, 0.0) l Point() Point r Point(100.0, 0.0) Point 100.0 0.0 print(l) print l koch(n, l, r) koch n l r print(r) print r class Point:
    def __init__(self, x = 0.0, y = 0.0):
        self.x = x
        self.y = y

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

    def __str__(self):
        return f"{self.x:.8f} {self.y:.8f}" Point l, r = Point(), Point(100.0, 0.0) Point() l r = Point(), Point(100.0, 0.0) Point(100.0, 0.0) r def koch(d, l, r):
    if d == 0:
        return

    s = Point()
    t = Point()
    u = Point()
    s.x = (2*l.x + 1*r.x) / (1 + 2)
    s.y = (2*l.y + 1*r.y) / (1 + 2)
    t.x = (1*l.x + 2*r.x) / (2 + 1)
    t.y = (1*l.y + 2*r.y) / (2 + 1)
    u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x
    u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y

    koch(d - 1, l, s)
    print(s)
    koch(d - 1, s, u)
    print(u)
    koch(d - 1, u, t)
    print(t)
    koch(d - 1, t, r) def koch(d, l, r):
    if d == 0:
        return

    s = Point()
    t = Point()
    u = Point()
    s.x = (2*l.x + 1*r.x) / (1 + 2)
    s.y = (2*l.y + 1*r.y) / (1 + 2)
    t.x = (1*l.x + 2*r.x) / (2 + 1)
    t.y = (1*l.y + 2*r.y) / (2 + 1)
    u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x
    u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y

    koch(d - 1, l, s)
    print(s)
    koch(d - 1, s, u)
    print(u)
    koch(d - 1, u, t)
    print(t)
    koch(d - 1, t, r) koch n = int(input()) int(input()) n
import math

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

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


def koch(d, l, r):
    if d == 0:
        return

    s = Point()
    t = Point()
    u = Point()
    s.x = (2*l.x + 1*r.x) / (1 + 2)
    s.y = (2*l.y + 1*r.y) / (1 + 2)
    t.x = (1*l.x + 2*r.x) / (2 + 1)
    t.y = (1*l.y + 2*r.y) / (2 + 1)
    u.x = (t.x - s.x) * math.cos(math.radians(60)) - (t.y - s.y) * math.sin(math.radians(60)) + s.x
    u.y = (t.x - s.x) * math.sin(math.radians(60)) + (t.y - s.y) * math.cos(math.radians(60)) + s.y

    koch(d - 1, l, s)
    print(s)
    koch(d - 1, s, u)
    print(u)
    koch(d - 1, u, t)
    print(t)
    koch(d - 1, t, r)

n = int(input())
l, r = Point(), Point(100.0, 0.0)
print(l)
koch(n, l, r)
print(r)
