from math import sin
from math import cos
from math import pi

class point():
   def __init__(self,_x,_y):
       self.x = _x
       self.y = _y

def kock (n, p1, p2):
    if n == 0:
        return
    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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y)

    kock(n - 1, p1, s)
    print '%s %s' % (str(s.x), str(s.y))
    kock(n - 1, s, u)
    print '%s %s' % (str(u.x), str(u.y))
    kock(n - 1, u, t)
    print '%s %s' % (str(t.x), str(t.y))
    kock(n - 1, t, p2)

n = input();

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

print '%s %s' % (str(p1.x), str(p1.y))
kock(n, p1, p2)
print '%s %s' % (str(p2.x), str(p2.y)) from math import sin from math import cos from math import pi 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 kock (n, p1, p2):
    if n == 0:
        return
    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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y)

    kock(n - 1, p1, s)
    print '%s %s' % (str(s.x), str(s.y))
    kock(n - 1, s, u)
    print '%s %s' % (str(u.x), str(u.y))
    kock(n - 1, u, t)
    print '%s %s' % (str(t.x), str(t.y))
    kock(n - 1, t, p2) kock if n == 0:
        return
     n == 0 n 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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y) u point((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y) point (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 (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 %s' % (str(s.x), str(s.y)) '%s %s' (str(s.x), str(s.y)) str(s.x) str s.x s x str(s.y) str s.y s y kock(n - 1, s, u) kock n - 1 n 1 s u print '%s %s' % (str(u.x), str(u.y)) '%s %s' (str(u.x), str(u.y)) str(u.x) str u.x u x str(u.y) str u.y u y kock(n - 1, u, t) kock n - 1 n 1 u t print '%s %s' % (str(t.x), str(t.y)) '%s %s' (str(t.x), str(t.y)) str(t.x) str t.x t x str(t.y) str 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 '%s %s' % (str(p1.x), str(p1.y)) '%s %s' (str(p1.x), str(p1.y)) str(p1.x) str p1.x p1 x str(p1.y) str p1.y p1 y kock(n, p1, p2) kock n p1 p2 print '%s %s' % (str(p2.x), str(p2.y)) '%s %s' (str(p2.x), str(p2.y)) str(p2.x) str p2.x p2 x str(p2.y) str p2.y p2 y p2 = point(100., 0.) point(100., 0.) p2 p1 = point(0., 0.) point(0., 0.) p1 n = input() input() n def kock (n, p1, p2):
    if n == 0:
        return
    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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y)

    kock(n - 1, p1, s)
    print '%s %s' % (str(s.x), str(s.y))
    kock(n - 1, s, u)
    print '%s %s' % (str(u.x), str(u.y))
    kock(n - 1, u, t)
    print '%s %s' % (str(t.x), str(t.y))
    kock(n - 1, t, p2) def kock (n, p1, p2):
    if n == 0:
        return
    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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y)

    kock(n - 1, p1, s)
    print '%s %s' % (str(s.x), str(s.y))
    kock(n - 1, s, u)
    print '%s %s' % (str(u.x), str(u.y))
    kock(n - 1, u, t)
    print '%s %s' % (str(t.x), str(t.y))
    kock(n - 1, t, p2) kock 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
from math import sin
from math import cos
from math import pi

class point():
   def __init__(self,_x,_y):
       self.x = _x
       self.y = _y

def kock (n, p1, p2):
    if n == 0:
        return
    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((t.x - s.x) * cos(pi / 3.) - (t.y - s.y) * sin(pi / 3.) + s.x, (t.x - s.x) * sin(pi / 3.) + (t.y - s.y) * cos(pi / 3) + s.y)

    kock(n - 1, p1, s)
    print '%s %s' % (str(s.x), str(s.y))
    kock(n - 1, s, u)
    print '%s %s' % (str(u.x), str(u.y))
    kock(n - 1, u, t)
    print '%s %s' % (str(t.x), str(t.y))
    kock(n - 1, t, p2)

n = input();

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

print '%s %s' % (str(p1.x), str(p1.y))
kock(n, p1, p2)
print '%s %s' % (str(p2.x), str(p2.y))