import math
n = int(input())

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

def Koch(n,p1,p2):
    if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2)

p1 = Coordinate(0,0)
p2 = Coordinate(100,0)
print(str(p1.x) +" "+str(p1.y))
Koch(n,p1,p2)
print(str(p2.x) +" "+str(p2.y))
 import math math n = int(input()) n int(input()) int input() input class Coordinate:
    def __init__(self,x,y):
        self.x = x
        self.y = y Coordinate 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,p1,p2):
    if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2) Koch if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2) n == 0 n 0 return s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y) s Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y) Coordinate 2/3 * p1.x + 1/3 * p2.x 2/3 * p1.x 2/3 2 3 p1.x p1 x 1/3 * p2.x 1/3 1 3 p2.x p2 x 2/3 * p1.y + 1/3 * p2.y 2/3 * p1.y 2/3 2 3 p1.y p1 y 1/3 * p2.y 1/3 1 3 p2.y p2 y u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y) u Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y) Coordinate 1/3 * p1.x + 2/3 * p2.x 1/3 * p1.x 1/3 1 3 p1.x p1 x 2/3 * p2.x 2/3 2 3 p2.x p2 x 1/3 * p1.y + 2/3 * p2.y 1/3 * p1.y 1/3 1 3 p1.y p1 y 2/3 * p2.y 2/3 2 3 p2.y p2 y t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y) t Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y) Coordinate 1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x 1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) 1/2*(u.x-s.x) 1/2 1 2 u.x-s.x u.x u x s.x s x math.sqrt(3)/2*(u.y-s.y) math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 u.y-s.y u.y u y s.y s y s.x s x math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) math.sqrt(3)/2*(u.x-s.x) math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 u.x-s.x u.x u x s.x s x 1/2*(u.y-s.y) 1/2 1 2 u.y-s.y u.y u y s.y s y s.y s y Koch(n-1,p1,s) Koch n-1 n 1 p1 s print(str(s.x) +" "+str(s.y)) print str(s.x) +" "+str(s.y) str(s.x) +" " str(s.x) str s.x s x " " str(s.y) str s.y s y Koch(n-1,s,t) Koch n-1 n 1 s t print(str(t.x) +" "+str(t.y)) print str(t.x) +" "+str(t.y) str(t.x) +" " str(t.x) str t.x t x " " str(t.y) str t.y t y Koch(n-1,t,u) Koch n-1 n 1 t u print(str(u.x) +" "+str(u.y)) print str(u.x) +" "+str(u.y) str(u.x) +" " str(u.x) str u.x u x " " str(u.y) str u.y u y Koch(n-1,u,p2) Koch n-1 n 1 u p2 n n p1 p1 p2 p2 p1 = Coordinate(0,0) p1 Coordinate(0,0) Coordinate 0 0 p2 = Coordinate(100,0) p2 Coordinate(100,0) Coordinate 100 0 print(str(p1.x) +" "+str(p1.y)) print str(p1.x) +" "+str(p1.y) str(p1.x) +" " str(p1.x) str p1.x p1 x " " str(p1.y) str p1.y p1 y Koch(n,p1,p2) Koch n p1 p2 print(str(p2.x) +" "+str(p2.y)) print str(p2.x) +" "+str(p2.y) str(p2.x) +" " str(p2.x) str p2.x p2 x " " str(p2.y) str p2.y p2 y n = int(input()) int(input()) n def Koch(n,p1,p2):
    if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2) def Koch(n,p1,p2):
    if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2) Koch p2 = Coordinate(100,0) Coordinate(100,0) p2 class Coordinate:
    def __init__(self,x,y):
        self.x = x
        self.y = y class Coordinate:
    def __init__(self,x,y):
        self.x = x
        self.y = y Coordinate p1 = Coordinate(0,0) Coordinate(0,0) p1
import math
n = int(input())

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

def Koch(n,p1,p2):
    if n == 0:
        return
    else:
        s = Coordinate(2/3 * p1.x + 1/3 * p2.x, 2/3 * p1.y + 1/3 * p2.y)
        u = Coordinate(1/3 * p1.x + 2/3 * p2.x, 1/3 * p1.y + 2/3 * p2.y)
        t = Coordinate(1/2*(u.x-s.x) - math.sqrt(3)/2*(u.y-s.y) + s.x, math.sqrt(3)/2*(u.x-s.x) + 1/2*(u.y-s.y) + s.y)
        Koch(n-1,p1,s)
        print(str(s.x) +" "+str(s.y))
        Koch(n-1,s,t)
        print(str(t.x) +" "+str(t.y))
        Koch(n-1,t,u)
        print(str(u.x) +" "+str(u.y))
        Koch(n-1,u,p2)

p1 = Coordinate(0,0)
p2 = Coordinate(100,0)
print(str(p1.x) +" "+str(p1.y))
Koch(n,p1,p2)
print(str(p2.x) +" "+str(p2.y))

