import math

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

def kock(n, p1, p2):
    if n == 0:
        return

    s = Point(0, 0)
    t = Point(0, 0)
    u = Point(0, 0)

    s.x = (2 * p1.x + p2.x) / 3.0
    s.y = (2 * p1.y + p2.y) / 3.0
    t.x = (p1.x + p2.x * 2) / 3.0
    t.y = (p1.y + p2.y * 2) / 3.0
    u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x
    u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y

    kock(n - 1, p1, s)
    print "%.8f %.8f" % (s.x, s.y)
    kock(n - 1, s, u)
    print "%.8f %.8f" % (u.x, u.y)
    kock(n - 1, u, t)
    print "%.8f %.8f" % (t.x, t.y)
    kock(n - 1, t, p2)

n = input()

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

print "%.8f %.8f" % (p1.x, p1.y)
kock(n, p1, p2)
print "%.8f %.8f" % (p2.x, p2.y) import math math class Point:
    def __init__(self, num_x, num_y):
        self.x = num_x
        self.y = num_y Point def __init__(self, num_x, num_y):
        self.x = num_x
        self.y = num_y __init__ self.x = num_x self.x self x num_x self.y = num_y self.y self y num_y self self num_x num_x num_y num_y def kock(n, p1, p2):
    if n == 0:
        return

    s = Point(0, 0)
    t = Point(0, 0)
    u = Point(0, 0)

    s.x = (2 * p1.x + p2.x) / 3.0
    s.y = (2 * p1.y + p2.y) / 3.0
    t.x = (p1.x + p2.x * 2) / 3.0
    t.y = (p1.y + p2.y * 2) / 3.0
    u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x
    u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y

    kock(n - 1, p1, s)
    print "%.8f %.8f" % (s.x, s.y)
    kock(n - 1, s, u)
    print "%.8f %.8f" % (u.x, u.y)
    kock(n - 1, u, t)
    print "%.8f %.8f" % (t.x, t.y)
    kock(n - 1, t, p2) kock if n == 0:
        return

     n == 0 n 0 return s = Point(0, 0) s Point(0, 0) Point 0 0 t = Point(0, 0) t Point(0, 0) Point 0 0 u = Point(0, 0) u Point(0, 0) Point 0 0 s.x = (2 * p1.x + p2.x) / 3.0 s.x s x (2 * p1.x + p2.x) / 3.0 2 * p1.x + p2.x 2 * p1.x 2 p1.x p1 x p2.x p2 x 3.0 s.y = (2 * p1.y + p2.y) / 3.0 s.y s y (2 * p1.y + p2.y) / 3.0 2 * p1.y + p2.y 2 * p1.y 2 p1.y p1 y p2.y p2 y 3.0 t.x = (p1.x + p2.x * 2) / 3.0 t.x t x (p1.x + p2.x * 2) / 3.0 p1.x + p2.x * 2 p1.x p1 x p2.x * 2 p2.x p2 x 2 3.0 t.y = (p1.y + p2.y * 2) / 3.0 t.y t y (p1.y + p2.y * 2) / 3.0 p1.y + p2.y * 2 p1.y p1 y p2.y * 2 p2.y p2 y 2 3.0 u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x u.x u x (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) (t.x - s.x) * math.cos(math.pi / 3) t.x - s.x t.x t x s.x s x math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 (t.y - s.y) * math.sin(math.pi / 3) t.y - s.y t.y t y s.y s y math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 s.x s x u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y u.y u y (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) (t.x - s.x) * math.sin(math.pi / 3) t.x - s.x t.x t x s.x s x math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 (t.y - s.y) * math.cos(math.pi / 3) t.y - s.y t.y t y s.y s y math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 s.y s y kock(n - 1, p1, s) kock n - 1 n 1 p1 s print "%.8f %.8f" % (s.x, s.y) "%.8f %.8f" (s.x, s.y) s.x s x s.y s y kock(n - 1, s, u) kock n - 1 n 1 s u print "%.8f %.8f" % (u.x, u.y) "%.8f %.8f" (u.x, u.y) u.x u x u.y u y kock(n - 1, u, t) kock n - 1 n 1 u t print "%.8f %.8f" % (t.x, t.y) "%.8f %.8f" (t.x, t.y) t.x t x t.y t y kock(n - 1, t, p2) kock n - 1 n 1 t p2 n n p1 p1 p2 p2 n = input() n input() input p1 = Point(0, 0) p1 Point(0, 0) Point 0 0 p2 = Point(100, 0) p2 Point(100, 0) Point 100 0 print "%.8f %.8f" % (p1.x, p1.y) "%.8f %.8f" (p1.x, p1.y) p1.x p1 x p1.y p1 y kock(n, p1, p2) kock n p1 p2 print "%.8f %.8f" % (p2.x, p2.y) "%.8f %.8f" (p2.x, p2.y) p2.x p2 x p2.y p2 y def kock(n, p1, p2):
    if n == 0:
        return

    s = Point(0, 0)
    t = Point(0, 0)
    u = Point(0, 0)

    s.x = (2 * p1.x + p2.x) / 3.0
    s.y = (2 * p1.y + p2.y) / 3.0
    t.x = (p1.x + p2.x * 2) / 3.0
    t.y = (p1.y + p2.y * 2) / 3.0
    u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x
    u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y

    kock(n - 1, p1, s)
    print "%.8f %.8f" % (s.x, s.y)
    kock(n - 1, s, u)
    print "%.8f %.8f" % (u.x, u.y)
    kock(n - 1, u, t)
    print "%.8f %.8f" % (t.x, t.y)
    kock(n - 1, t, p2) def kock(n, p1, p2):
    if n == 0:
        return

    s = Point(0, 0)
    t = Point(0, 0)
    u = Point(0, 0)

    s.x = (2 * p1.x + p2.x) / 3.0
    s.y = (2 * p1.y + p2.y) / 3.0
    t.x = (p1.x + p2.x * 2) / 3.0
    t.y = (p1.y + p2.y * 2) / 3.0
    u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x
    u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y

    kock(n - 1, p1, s)
    print "%.8f %.8f" % (s.x, s.y)
    kock(n - 1, s, u)
    print "%.8f %.8f" % (u.x, u.y)
    kock(n - 1, u, t)
    print "%.8f %.8f" % (t.x, t.y)
    kock(n - 1, t, p2) kock p1 = Point(0, 0) Point(0, 0) p1 class Point:
    def __init__(self, num_x, num_y):
        self.x = num_x
        self.y = num_y class Point:
    def __init__(self, num_x, num_y):
        self.x = num_x
        self.y = num_y Point n = input() input() n p2 = Point(100, 0) Point(100, 0) p2
import math

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

def kock(n, p1, p2):
    if n == 0:
        return

    s = Point(0, 0)
    t = Point(0, 0)
    u = Point(0, 0)

    s.x = (2 * p1.x + p2.x) / 3.0
    s.y = (2 * p1.y + p2.y) / 3.0
    t.x = (p1.x + p2.x * 2) / 3.0
    t.y = (p1.y + p2.y * 2) / 3.0
    u.x = (t.x - s.x) * math.cos(math.pi / 3) - (t.y - s.y) * math.sin(math.pi / 3) + s.x
    u.y = (t.x - s.x) * math.sin(math.pi / 3) + (t.y - s.y) * math.cos(math.pi / 3) + s.y

    kock(n - 1, p1, s)
    print "%.8f %.8f" % (s.x, s.y)
    kock(n - 1, s, u)
    print "%.8f %.8f" % (u.x, u.y)
    kock(n - 1, u, t)
    print "%.8f %.8f" % (t.x, t.y)
    kock(n - 1, t, p2)

n = input()

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

print "%.8f %.8f" % (p1.x, p1.y)
kock(n, p1, p2)
print "%.8f %.8f" % (p2.x, p2.y)