def rec(A,n):
    if n==0:
        return A
    else:
        return rec(draw(A),n-1)

def draw(A):
    l=[]
    for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
    l.append(A[-1])   
    return l

n=int(input())
A=[(0.0,0.0),(100.0,0.0)]
B=rec(A,n)

for P in B:
    print(f'{P[0]} {P[1]}') def rec(A,n):
    if n==0:
        return A
    else:
        return rec(draw(A),n-1) rec if n==0:
        return A
    else:
        return rec(draw(A),n-1) n==0 n 0 return A A return rec(draw(A),n-1) rec(draw(A),n-1) rec draw(A) draw A n-1 n 1 A A n n def draw(A):
    l=[]
    for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
    l.append(A[-1])   
    return l draw l=[] l [] for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
     i range(len(A)-1) range len(A)-1 len(A) len A 1 a=(A[i+1][0]-A[i][0])/3 a (A[i+1][0]-A[i][0])/3 A[i+1][0]-A[i][0] A[i+1][0] [i+1] A i+1 i 1 0 A[i][0] [i] A i 0 3 b=(A[i+1][1]-A[i][1])/3 b (A[i+1][1]-A[i][1])/3 A[i+1][1]-A[i][1] A[i+1][1] [i+1] A i+1 i 1 1 A[i][1] [i] A i 1 3 u0=(a,b) u0 (a,b) a b u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2)) u60 (a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2)) a*(1/2)-b*(3**(1/2)/2) a*(1/2) a 1/2 1 2 b*(3**(1/2)/2) b 3**(1/2)/2 3**(1/2) 3 1/2 1 2 2 a*(3**(1/2)/2)+b*(1/2) a*(3**(1/2)/2) a 3**(1/2)/2 3**(1/2) 3 1/2 1 2 2 b*(1/2) b 1/2 1 2 u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2)) u300 (a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2)) a*(1/2)+b*(3**(1/2)/2) a*(1/2) a 1/2 1 2 b*(3**(1/2)/2) b 3**(1/2)/2 3**(1/2) 3 1/2 1 2 2 -a*(3**(1/2)/2)+b*(1/2) -a*(3**(1/2)/2) -a a 3**(1/2)/2 3**(1/2) 3 1/2 1 2 2 b*(1/2) b 1/2 1 2 P=(A[i][0]+u0[0],A[i][1]+u0[1]) P (A[i][0]+u0[0],A[i][1]+u0[1]) A[i][0]+u0[0] A[i][0] [i] A i 0 u0[0] u0 0 A[i][1]+u0[1] A[i][1] [i] A i 1 u0[1] u0 1 Q=(P[0]+u60[0],P[1]+u60[1]) Q (P[0]+u60[0],P[1]+u60[1]) P[0]+u60[0] P[0] P 0 u60[0] u60 0 P[1]+u60[1] P[1] P 1 u60[1] u60 1 R=(Q[0]+u300[0],Q[1]+u300[1]) R (Q[0]+u300[0],Q[1]+u300[1]) Q[0]+u300[0] Q[0] Q 0 u300[0] u300 0 Q[1]+u300[1] Q[1] Q 1 u300[1] u300 1 l.extend([A[i],P,Q,R]) l.extend l extend [A[i],P,Q,R] A[i] A i P Q R l.append(A[-1]) l.append l append A[-1] A -1 return l l A A n=int(input()) n int(input()) int input() input A=[(0.0,0.0),(100.0,0.0)] A [(0.0,0.0),(100.0,0.0)] (0.0,0.0) 0.0 0.0 (100.0,0.0) 100.0 0.0 B=rec(A,n) B rec(A,n) rec A n for P in B:
    print(f'{P[0]} {P[1]}') P B print(f'{P[0]} {P[1]}') print f'{P[0]} {P[1]}' A=[(0.0,0.0),(100.0,0.0)] [(0.0,0.0),(100.0,0.0)] A def draw(A):
    l=[]
    for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
    l.append(A[-1])   
    return l def draw(A):
    l=[]
    for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
    l.append(A[-1])   
    return l draw B=rec(A,n) rec(A,n) B n=int(input()) int(input()) n def rec(A,n):
    if n==0:
        return A
    else:
        return rec(draw(A),n-1) def rec(A,n):
    if n==0:
        return A
    else:
        return rec(draw(A),n-1) rec
def rec(A,n):
    if n==0:
        return A
    else:
        return rec(draw(A),n-1)

def draw(A):
    l=[]
    for i in range(len(A)-1):
        a=(A[i+1][0]-A[i][0])/3
        b=(A[i+1][1]-A[i][1])/3
        u0=(a,b)
        u60=(a*(1/2)-b*(3**(1/2)/2),a*(3**(1/2)/2)+b*(1/2))
        u300=(a*(1/2)+b*(3**(1/2)/2),-a*(3**(1/2)/2)+b*(1/2))
        
        P=(A[i][0]+u0[0],A[i][1]+u0[1])
        Q=(P[0]+u60[0],P[1]+u60[1])
        R=(Q[0]+u300[0],Q[1]+u300[1])

        l.extend([A[i],P,Q,R])
    l.append(A[-1])   
    return l

n=int(input())
A=[(0.0,0.0),(100.0,0.0)]
B=rec(A,n)

for P in B:
    print(f'{P[0]} {P[1]}')
