import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

N = int(input())
ans = []
const = 2*3**0.5
def korch_curve(Lx,Ly,Rx,Ry,i):
    if i == 0:
        ans.append((Lx,Ly))
        return 
    third_y = (Ly*2 + Ry)/3
    third_x = (Lx*2 + Rx)/3
    korch_curve(Lx,Ly,third_x,third_y,i - 1)
    middle_x = (Lx + Rx)/2 - (Ry - Ly)/const
    middle_y = (Ly + Ry)/2 + (Rx - Lx)/const
    korch_curve(third_x,third_y,middle_x,middle_y,i - 1)
    third_second_x = (Lx + Rx*2)/3
    third_second_y = (Ly + Ry*2)/3
    korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1)
    korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1)
korch_curve(0,0,100,0,N)
ans.append((100,0))
for a in ans:
    print(*a) import sys sys sys.setrecursionlimit(10000000) sys.setrecursionlimit sys setrecursionlimit 10000000 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = 10 ** 15 INF 10 ** 15 10 15 N = int(input()) N int(input()) int input() input ans = [] ans [] const = 2*3**0.5 const 2*3**0.5 2 3**0.5 3 0.5 def korch_curve(Lx,Ly,Rx,Ry,i):
    if i == 0:
        ans.append((Lx,Ly))
        return 
    third_y = (Ly*2 + Ry)/3
    third_x = (Lx*2 + Rx)/3
    korch_curve(Lx,Ly,third_x,third_y,i - 1)
    middle_x = (Lx + Rx)/2 - (Ry - Ly)/const
    middle_y = (Ly + Ry)/2 + (Rx - Lx)/const
    korch_curve(third_x,third_y,middle_x,middle_y,i - 1)
    third_second_x = (Lx + Rx*2)/3
    third_second_y = (Ly + Ry*2)/3
    korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1)
    korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1) korch_curve if i == 0:
        ans.append((Lx,Ly))
        return 
     i == 0 i 0 ans.append((Lx,Ly)) ans.append ans append (Lx,Ly) Lx Ly return third_y = (Ly*2 + Ry)/3 third_y (Ly*2 + Ry)/3 Ly*2 + Ry Ly*2 Ly 2 Ry 3 third_x = (Lx*2 + Rx)/3 third_x (Lx*2 + Rx)/3 Lx*2 + Rx Lx*2 Lx 2 Rx 3 korch_curve(Lx,Ly,third_x,third_y,i - 1) korch_curve Lx Ly third_x third_y i - 1 i 1 middle_x = (Lx + Rx)/2 - (Ry - Ly)/const middle_x (Lx + Rx)/2 - (Ry - Ly)/const (Lx + Rx)/2 Lx + Rx Lx Rx 2 (Ry - Ly)/const Ry - Ly Ry Ly const middle_y = (Ly + Ry)/2 + (Rx - Lx)/const middle_y (Ly + Ry)/2 + (Rx - Lx)/const (Ly + Ry)/2 Ly + Ry Ly Ry 2 (Rx - Lx)/const Rx - Lx Rx Lx const korch_curve(third_x,third_y,middle_x,middle_y,i - 1) korch_curve third_x third_y middle_x middle_y i - 1 i 1 third_second_x = (Lx + Rx*2)/3 third_second_x (Lx + Rx*2)/3 Lx + Rx*2 Lx Rx*2 Rx 2 3 third_second_y = (Ly + Ry*2)/3 third_second_y (Ly + Ry*2)/3 Ly + Ry*2 Ly Ry*2 Ry 2 3 korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1) korch_curve middle_x middle_y third_second_x third_second_y i - 1 i 1 korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1) korch_curve third_second_x third_second_y Rx Ry i - 1 i 1 Lx Lx Ly Ly Rx Rx Ry Ry i i korch_curve(0,0,100,0,N) korch_curve 0 0 100 0 N ans.append((100,0)) ans.append ans append (100,0) 100 0 for a in ans:
    print(*a) a ans print(*a) print *a a N = int(input()) int(input()) N def korch_curve(Lx,Ly,Rx,Ry,i):
    if i == 0:
        ans.append((Lx,Ly))
        return 
    third_y = (Ly*2 + Ry)/3
    third_x = (Lx*2 + Rx)/3
    korch_curve(Lx,Ly,third_x,third_y,i - 1)
    middle_x = (Lx + Rx)/2 - (Ry - Ly)/const
    middle_y = (Ly + Ry)/2 + (Rx - Lx)/const
    korch_curve(third_x,third_y,middle_x,middle_y,i - 1)
    third_second_x = (Lx + Rx*2)/3
    third_second_y = (Ly + Ry*2)/3
    korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1)
    korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1) def korch_curve(Lx,Ly,Rx,Ry,i):
    if i == 0:
        ans.append((Lx,Ly))
        return 
    third_y = (Ly*2 + Ry)/3
    third_x = (Lx*2 + Rx)/3
    korch_curve(Lx,Ly,third_x,third_y,i - 1)
    middle_x = (Lx + Rx)/2 - (Ry - Ly)/const
    middle_y = (Ly + Ry)/2 + (Rx - Lx)/const
    korch_curve(third_x,third_y,middle_x,middle_y,i - 1)
    third_second_x = (Lx + Rx*2)/3
    third_second_y = (Ly + Ry*2)/3
    korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1)
    korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1) korch_curve const = 2*3**0.5 2*3**0.5 const ans = [] [] ans INF = 10 ** 15 10 ** 15 INF MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

N = int(input())
ans = []
const = 2*3**0.5
def korch_curve(Lx,Ly,Rx,Ry,i):
    if i == 0:
        ans.append((Lx,Ly))
        return 
    third_y = (Ly*2 + Ry)/3
    third_x = (Lx*2 + Rx)/3
    korch_curve(Lx,Ly,third_x,third_y,i - 1)
    middle_x = (Lx + Rx)/2 - (Ry - Ly)/const
    middle_y = (Ly + Ry)/2 + (Rx - Lx)/const
    korch_curve(third_x,third_y,middle_x,middle_y,i - 1)
    third_second_x = (Lx + Rx*2)/3
    third_second_y = (Ly + Ry*2)/3
    korch_curve(middle_x,middle_y,third_second_x,third_second_y,i - 1)
    korch_curve(third_second_x,third_second_y,Rx,Ry,i - 1)
korch_curve(0,0,100,0,N)
ans.append((100,0))
for a in ans:
    print(*a)
