import math

d = int(input())

class point:
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y

p1 = point(0, 0)
p2 = point(100, 0)

def koch(d, p1, p2):
    pi = math.pi
    cos60 = math.cos(pi/3)
    sin60 = math.sin(pi/3)
    if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2)

print(p1.x, p1.y)
koch(d, p1, p2)
print(p2.x, p2.y) import math math d = int(input()) d int(input()) int input() input class point:
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y point def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y __init__ self.x = arg_x self.x self x arg_x self.y = arg_y self.y self y arg_y self self arg_x arg_x arg_y arg_y p1 = point(0, 0) p1 point(0, 0) point 0 0 p2 = point(100, 0) p2 point(100, 0) point 100 0 def koch(d, p1, p2):
    pi = math.pi
    cos60 = math.cos(pi/3)
    sin60 = math.sin(pi/3)
    if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2) koch pi = math.pi pi math.pi math pi cos60 = math.cos(pi/3) cos60 math.cos(pi/3) math.cos math cos pi/3 pi 3 sin60 = math.sin(pi/3) sin60 math.sin(pi/3) math.sin math sin pi/3 pi 3 if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2) d == 0 d 0 return s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3) s point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3) point (2*p1.x + 1*p2.x)/3 2*p1.x + 1*p2.x 2*p1.x 2 p1.x p1 x 1*p2.x 1 p2.x p2 x 3 (2*p1.y + 1*p2.y)/3 2*p1.y + 1*p2.y 2*p1.y 2 p1.y p1 y 1*p2.y 1 p2.y p2 y 3 t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3) t point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3) point (1*p1.x + 2*p2.x)/3 1*p1.x + 2*p2.x 1*p1.x 1 p1.x p1 x 2*p2.x 2 p2.x p2 x 3 (1*p1.y + 2*p2.y)/3 1*p1.y + 2*p2.y 1*p1.y 1 p1.y p1 y 2*p2.y 2 p2.y p2 y 3 u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y)) u point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y)) point s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y) s.x + cos60*(t.x-s.x) s.x s x cos60*(t.x-s.x) cos60 t.x-s.x t.x t x s.x s x sin60*(t.y-s.y) sin60 t.y-s.y t.y t y s.y s y s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y) s.y + sin60*(t.x-s.x) s.y s y sin60*(t.x-s.x) sin60 t.x-s.x t.x t x s.x s x cos60*(t.y-s.y) cos60 t.y-s.y t.y t y s.y s y koch(d-1, p1, s) koch d-1 d 1 p1 s print(s.x, s.y) print s.x s x s.y s y koch(d-1, s, u) koch d-1 d 1 s u print(u.x, u.y) print u.x u x u.y u y koch(d-1, u, t) koch d-1 d 1 u t print(t.x, t.y) print t.x t x t.y t y koch(d-1, t, p2) koch d-1 d 1 t p2 d d p1 p1 p2 p2 print(p1.x, p1.y) print p1.x p1 x p1.y p1 y koch(d, p1, p2) koch d p1 p2 print(p2.x, p2.y) print p2.x p2 x p2.y p2 y p1 = point(0, 0) point(0, 0) p1 d = int(input()) int(input()) d p2 = point(100, 0) point(100, 0) p2 def koch(d, p1, p2):
    pi = math.pi
    cos60 = math.cos(pi/3)
    sin60 = math.sin(pi/3)
    if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2) def koch(d, p1, p2):
    pi = math.pi
    cos60 = math.cos(pi/3)
    sin60 = math.sin(pi/3)
    if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2) koch class point:
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y class point:
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y point
import math

d = int(input())

class point:
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y

p1 = point(0, 0)
p2 = point(100, 0)

def koch(d, p1, p2):
    pi = math.pi
    cos60 = math.cos(pi/3)
    sin60 = math.sin(pi/3)
    if d == 0:
        return
    else:
        s = point((2*p1.x + 1*p2.x)/3, (2*p1.y + 1*p2.y)/3)
        t = point((1*p1.x + 2*p2.x)/3, (1*p1.y + 2*p2.y)/3)
        u = point(s.x + cos60*(t.x-s.x) - sin60*(t.y-s.y), s.y + sin60*(t.x-s.x) + cos60*(t.y-s.y))
        koch(d-1, p1, s)
        print(s.x, s.y)
        koch(d-1, s, u)
        print(u.x, u.y)
        koch(d-1, u, t)
        print(t.x, t.y)
        koch(d-1, t, p2)

print(p1.x, p1.y)
koch(d, p1, p2)
print(p2.x, p2.y)
