import math

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


def koch(n, a, b):
    if n == 0:
        return
    th = math.radians(60)
    s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3)
    t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3)
    u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y)

    koch(n-1, a, s)
    print(s.x, s.y)
    koch(n-1, s, u)
    print(u.x, u.y)
    koch(n-1, u, t)
    print(t.x, t.y)
    koch(n-1, t, b)

if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    n = int(input())

    a = Point(0, 0)
    b = Point(100, 0)

    print(a.x, a.y)
    koch(n, a, b)
    print(b.x, b.y) import math math class Point():
    def __init__(self, x, y):
        self.x = x
        self.y = y 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 koch(n, a, b):
    if n == 0:
        return
    th = math.radians(60)
    s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3)
    t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3)
    u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y)

    koch(n-1, a, s)
    print(s.x, s.y)
    koch(n-1, s, u)
    print(u.x, u.y)
    koch(n-1, u, t)
    print(t.x, t.y)
    koch(n-1, t, b) koch if n == 0:
        return
     n == 0 n 0 return th = math.radians(60) th math.radians(60) math.radians math radians 60 s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3) s Point((2*a.x+b.x)/3, (2*a.y+b.y)/3) Point (2*a.x+b.x)/3 2*a.x+b.x 2*a.x 2 a.x a x b.x b x 3 (2*a.y+b.y)/3 2*a.y+b.y 2*a.y 2 a.y a y b.y b y 3 t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3) t Point((a.x+2*b.x)/3, (a.y+2*b.y)/3) Point (a.x+2*b.x)/3 a.x+2*b.x a.x a x 2*b.x 2 b.x b x 3 (a.y+2*b.y)/3 a.y+2*b.y a.y a y 2*b.y 2 b.y b y 3 u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y) u Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y) Point (t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x (t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th) (t.x-s.x)* math.cos(th) t.x-s.x t.x t x s.x s x math.cos(th) math.cos math cos th (t.y-s.y)*math.sin(th) t.y-s.y t.y t y s.y s y math.sin(th) math.sin math sin th s.x s x (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th) (t.x-s.x)* math.sin(th) t.x-s.x t.x t x s.x s x math.sin(th) math.sin math sin th (t.y-s.y)*math.cos(th) t.y-s.y t.y t y s.y s y math.cos(th) math.cos math cos th s.y s y koch(n-1, a, s) koch n-1 n 1 a s print(s.x, s.y) print s.x s x s.y s y koch(n-1, s, u) koch n-1 n 1 s u print(u.x, u.y) print u.x u x u.y u y koch(n-1, u, t) koch n-1 n 1 u t print(t.x, t.y) print t.x t x t.y t y koch(n-1, t, b) koch n-1 n 1 t b n n a a b b if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    n = int(input())

    a = Point(0, 0)
    b = Point(100, 0)

    print(a.x, a.y)
    koch(n, a, b)
    print(b.x, b.y) __name__ == '__main__' __name__ '__main__' import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n = int(input()) n int(input()) int input() input a = Point(0, 0) a Point(0, 0) Point 0 0 b = Point(100, 0) b Point(100, 0) Point 100 0 print(a.x, a.y) print a.x a x a.y a y koch(n, a, b) koch n a b print(b.x, b.y) print b.x b x b.y b y input = sys.stdin.readline sys.stdin.readline input a = Point(0, 0) Point(0, 0) a class Point():
    def __init__(self, x, y):
        self.x = x
        self.y = y class Point():
    def __init__(self, x, y):
        self.x = x
        self.y = y Point def koch(n, a, b):
    if n == 0:
        return
    th = math.radians(60)
    s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3)
    t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3)
    u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y)

    koch(n-1, a, s)
    print(s.x, s.y)
    koch(n-1, s, u)
    print(u.x, u.y)
    koch(n-1, u, t)
    print(t.x, t.y)
    koch(n-1, t, b) def koch(n, a, b):
    if n == 0:
        return
    th = math.radians(60)
    s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3)
    t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3)
    u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y)

    koch(n-1, a, s)
    print(s.x, s.y)
    koch(n-1, s, u)
    print(u.x, u.y)
    koch(n-1, u, t)
    print(t.x, t.y)
    koch(n-1, t, b) koch b = Point(100, 0) Point(100, 0) b n = int(input()) int(input()) n
import math

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


def koch(n, a, b):
    if n == 0:
        return
    th = math.radians(60)
    s = Point((2*a.x+b.x)/3, (2*a.y+b.y)/3)
    t = Point((a.x+2*b.x)/3, (a.y+2*b.y)/3)
    u = Point((t.x-s.x)* math.cos(th) - (t.y-s.y)*math.sin(th)+s.x,
                (t.x-s.x)* math.sin(th) + (t.y-s.y)*math.cos(th)+s.y)

    koch(n-1, a, s)
    print(s.x, s.y)
    koch(n-1, s, u)
    print(u.x, u.y)
    koch(n-1, u, t)
    print(t.x, t.y)
    koch(n-1, t, b)

if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    n = int(input())

    a = Point(0, 0)
    b = Point(100, 0)

    print(a.x, a.y)
    koch(n, a, b)
    print(b.x, b.y)
