import math

def coh(n, p1, p2, pt_list, m):
    if n>m:
        return 
    x1, y1 = p1
    x2, y2 = p2
    
    nx, ny = -(y2-y1), x2-x1

    xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3
    xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3  
    xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3
    
    ps = xs, ys
    pu = xu, yu
    pt = xt, yt
    
    coh(n+1, p1, ps, pt_list, m)
    pt_list += [ps]
    coh(n+1, ps, pu, pt_list, m)
    pt_list += [pu]
    coh(n+1, pu, pt, pt_list, m)
    pt_list += [pt]
    coh(n+1, pt, p2, pt_list, m)

m = int(input())
pt_list = [(0,0)]
coh(1, (0,0), (100,0), pt_list, m)
pt_list += [(100,0)]
for xy in pt_list:
    print('%.9f %.9f'%(xy[0], xy[1])) import math math def coh(n, p1, p2, pt_list, m):
    if n>m:
        return 
    x1, y1 = p1
    x2, y2 = p2
    
    nx, ny = -(y2-y1), x2-x1

    xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3
    xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3  
    xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3
    
    ps = xs, ys
    pu = xu, yu
    pt = xt, yt
    
    coh(n+1, p1, ps, pt_list, m)
    pt_list += [ps]
    coh(n+1, ps, pu, pt_list, m)
    pt_list += [pu]
    coh(n+1, pu, pt, pt_list, m)
    pt_list += [pt]
    coh(n+1, pt, p2, pt_list, m) coh if n>m:
        return 
     n>m n m return x1, y1 = p1 x1 p1 y1 x2, y2 = p2 x2 p2 y2 nx, ny = -(y2-y1), x2-x1 nx -(y2-y1) y2-y1 y2 y1 ny x2-x1 x2 x1 xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3 xs x1 + (x2-x1)/3 x1 (x2-x1)/3 x2-x1 x2 x1 3 ys y1 + (y2-y1)/3 y1 (y2-y1)/3 y2-y1 y2 y1 3 xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3 xu (x1+x2)/2 + nx*math.sqrt(3)/2/3 (x1+x2)/2 x1+x2 x1 x2 2 nx*math.sqrt(3)/2/3 nx*math.sqrt(3)/2 nx*math.sqrt(3) nx math.sqrt(3) math.sqrt math sqrt 3 2 3 yu (y1+y2)/2 + ny*math.sqrt(3)/2/3 (y1+y2)/2 y1+y2 y1 y2 2 ny*math.sqrt(3)/2/3 ny*math.sqrt(3)/2 ny*math.sqrt(3) ny math.sqrt(3) math.sqrt math sqrt 3 2 3 xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3 xt x1 + (x2-x1)*2/3 x1 (x2-x1)*2/3 (x2-x1)*2 x2-x1 x2 x1 2 3 yt y1 + (y2-y1)*2/3 y1 (y2-y1)*2/3 (y2-y1)*2 y2-y1 y2 y1 2 3 ps = xs, ys ps ps = xs, ys xs ys pu = xu, yu pu pu = xu, yu xu yu pt = xt, yt pt pt = xt, yt xt yt coh(n+1, p1, ps, pt_list, m) coh n+1 n 1 p1 ps pt_list m pt_list += [ps] pt_list [ps] ps coh(n+1, ps, pu, pt_list, m) coh n+1 n 1 ps pu pt_list m pt_list += [pu] pt_list [pu] pu coh(n+1, pu, pt, pt_list, m) coh n+1 n 1 pu pt pt_list m pt_list += [pt] pt_list [pt] pt coh(n+1, pt, p2, pt_list, m) coh n+1 n 1 pt p2 pt_list m n n p1 p1 p2 p2 pt_list pt_list m m m = int(input()) m int(input()) int input() input pt_list = [(0,0)] pt_list [(0,0)] (0,0) 0 0 coh(1, (0,0), (100,0), pt_list, m) coh 1 (0,0) 0 0 (100,0) 100 0 pt_list m pt_list += [(100,0)] pt_list [(100,0)] (100,0) 100 0 for xy in pt_list:
    print('%.9f %.9f'%(xy[0], xy[1])) xy pt_list print('%.9f %.9f'%(xy[0], xy[1])) print '%.9f %.9f'%(xy[0], xy[1]) '%.9f %.9f' (xy[0], xy[1]) xy[0] xy 0 xy[1] xy 1 pt_list += [(100,0)] [(100,0)] pt_list m = int(input()) int(input()) m def coh(n, p1, p2, pt_list, m):
    if n>m:
        return 
    x1, y1 = p1
    x2, y2 = p2
    
    nx, ny = -(y2-y1), x2-x1

    xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3
    xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3  
    xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3
    
    ps = xs, ys
    pu = xu, yu
    pt = xt, yt
    
    coh(n+1, p1, ps, pt_list, m)
    pt_list += [ps]
    coh(n+1, ps, pu, pt_list, m)
    pt_list += [pu]
    coh(n+1, pu, pt, pt_list, m)
    pt_list += [pt]
    coh(n+1, pt, p2, pt_list, m) def coh(n, p1, p2, pt_list, m):
    if n>m:
        return 
    x1, y1 = p1
    x2, y2 = p2
    
    nx, ny = -(y2-y1), x2-x1

    xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3
    xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3  
    xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3
    
    ps = xs, ys
    pu = xu, yu
    pt = xt, yt
    
    coh(n+1, p1, ps, pt_list, m)
    pt_list += [ps]
    coh(n+1, ps, pu, pt_list, m)
    pt_list += [pu]
    coh(n+1, pu, pt, pt_list, m)
    pt_list += [pt]
    coh(n+1, pt, p2, pt_list, m) coh pt_list = [(0,0)] [(0,0)] pt_list
import math

def coh(n, p1, p2, pt_list, m):
    if n>m:
        return 
    x1, y1 = p1
    x2, y2 = p2
    
    nx, ny = -(y2-y1), x2-x1

    xs, ys = x1 + (x2-x1)/3, y1 + (y2-y1)/3
    xu, yu = (x1+x2)/2 + nx*math.sqrt(3)/2/3 , (y1+y2)/2 + ny*math.sqrt(3)/2/3  
    xt, yt = x1 + (x2-x1)*2/3, y1 + (y2-y1)*2/3
    
    ps = xs, ys
    pu = xu, yu
    pt = xt, yt
    
    coh(n+1, p1, ps, pt_list, m)
    pt_list += [ps]
    coh(n+1, ps, pu, pt_list, m)
    pt_list += [pu]
    coh(n+1, pu, pt, pt_list, m)
    pt_list += [pt]
    coh(n+1, pt, p2, pt_list, m)

m = int(input())
pt_list = [(0,0)]
coh(1, (0,0), (100,0), pt_list, m)
pt_list += [(100,0)]
for xy in pt_list:
    print('%.9f %.9f'%(xy[0], xy[1]))
