import math

def rot60(s,t):
    v=t-s
    a=1/2+complex(0,(math.sqrt(3)/2))
    return v*a+s

def puts(p):
    x=p.real
    y=p.imag
    print('{real} {imaginary}'.format(real=x,imaginary=y))

def koch(p1, p2, n):
    if n==0:
        return

    s=(p2-p1)*(1/3)+p1
    t=(p2-p1)*(2/3)+p1
    u=rot60(s,t)
    koch(p1,s,n-1)
    puts(s)
    koch(s,u,n-1)
    puts(u)
    koch(u,t,n-1)
    puts(t)
    koch(t,p2,n-1)
    
n=int(input())
s=complex(0,0)
t=complex(100,0)
puts(s)
koch(s,t,n) 
puts(t) import math math def rot60(s,t):
    v=t-s
    a=1/2+complex(0,(math.sqrt(3)/2))
    return v*a+s rot60 v=t-s v t-s t s a=1/2+complex(0,(math.sqrt(3)/2)) a 1/2+complex(0,(math.sqrt(3)/2)) 1/2 1 2 complex(0,(math.sqrt(3)/2)) complex 0 math.sqrt(3)/2 math.sqrt(3) math.sqrt math sqrt 3 2 return v*a+s v*a+s v*a v a s s s t t def puts(p):
    x=p.real
    y=p.imag
    print('{real} {imaginary}'.format(real=x,imaginary=y)) puts x=p.real x p.real p real y=p.imag y p.imag p imag print('{real} {imaginary}'.format(real=x,imaginary=y)) print '{real} {imaginary}'.format(real=x,imaginary=y) '{real} {imaginary}'.format '{real} {imaginary}' format real=x real x imaginary=y imaginary y p p def koch(p1, p2, n):
    if n==0:
        return

    s=(p2-p1)*(1/3)+p1
    t=(p2-p1)*(2/3)+p1
    u=rot60(s,t)
    koch(p1,s,n-1)
    puts(s)
    koch(s,u,n-1)
    puts(u)
    koch(u,t,n-1)
    puts(t)
    koch(t,p2,n-1)
     koch if n==0:
        return

     n==0 n 0 return s=(p2-p1)*(1/3)+p1 s (p2-p1)*(1/3)+p1 (p2-p1)*(1/3) p2-p1 p2 p1 1/3 1 3 p1 t=(p2-p1)*(2/3)+p1 t (p2-p1)*(2/3)+p1 (p2-p1)*(2/3) p2-p1 p2 p1 2/3 2 3 p1 u=rot60(s,t) u rot60(s,t) rot60 s t koch(p1,s,n-1) koch p1 s n-1 n 1 puts(s) puts s koch(s,u,n-1) koch s u n-1 n 1 puts(u) puts u koch(u,t,n-1) koch u t n-1 n 1 puts(t) puts t koch(t,p2,n-1) koch t p2 n-1 n 1 p1 p1 p2 p2 n n n=int(input()) n int(input()) int input() input s=complex(0,0) s complex(0,0) complex 0 0 t=complex(100,0) t complex(100,0) complex 100 0 puts(s) puts s koch(s,t,n) koch s t n puts(t) puts t def puts(p):
    x=p.real
    y=p.imag
    print('{real} {imaginary}'.format(real=x,imaginary=y)) def puts(p):
    x=p.real
    y=p.imag
    print('{real} {imaginary}'.format(real=x,imaginary=y)) puts n=int(input()) int(input()) n t=complex(100,0) complex(100,0) t def rot60(s,t):
    v=t-s
    a=1/2+complex(0,(math.sqrt(3)/2))
    return v*a+s def rot60(s,t):
    v=t-s
    a=1/2+complex(0,(math.sqrt(3)/2))
    return v*a+s rot60 s=complex(0,0) complex(0,0) s def koch(p1, p2, n):
    if n==0:
        return

    s=(p2-p1)*(1/3)+p1
    t=(p2-p1)*(2/3)+p1
    u=rot60(s,t)
    koch(p1,s,n-1)
    puts(s)
    koch(s,u,n-1)
    puts(u)
    koch(u,t,n-1)
    puts(t)
    koch(t,p2,n-1)
     def koch(p1, p2, n):
    if n==0:
        return

    s=(p2-p1)*(1/3)+p1
    t=(p2-p1)*(2/3)+p1
    u=rot60(s,t)
    koch(p1,s,n-1)
    puts(s)
    koch(s,u,n-1)
    puts(u)
    koch(u,t,n-1)
    puts(t)
    koch(t,p2,n-1)
     koch
import math

def rot60(s,t):
    v=t-s
    a=1/2+complex(0,(math.sqrt(3)/2))
    return v*a+s

def puts(p):
    x=p.real
    y=p.imag
    print('{real} {imaginary}'.format(real=x,imaginary=y))

def koch(p1, p2, n):
    if n==0:
        return

    s=(p2-p1)*(1/3)+p1
    t=(p2-p1)*(2/3)+p1
    u=rot60(s,t)
    koch(p1,s,n-1)
    puts(s)
    koch(s,u,n-1)
    puts(u)
    koch(u,t,n-1)
    puts(t)
    koch(t,p2,n-1)
    
n=int(input())
s=complex(0,0)
t=complex(100,0)
puts(s)
koch(s,t,n) 
puts(t)
