from collections import namedtuple
import math
Co = namedtuple('Co', 'x y')

def f(i, n, l, r):
    if i >= n:
        print(l.x, l.y)
        return
    il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y))
    ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y))

    trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y)
    triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y)
    trico = Co(trix, triy)

    f(i+1, n, l, il)
    #print(il.x, il.y)
    f(i+1, n, il, trico)
    #print(trico.x, trico.y)
    f(i+1, n, trico, ir)
    #print(ir.x, ir.y)
    f(i+1, n, ir, r)

if __name__ == '__main__':
    n = int(input())
    #print(0, 0)
    f(0, n, Co(0,0), Co(100,0))
    print(100, 0)
 from collections import namedtuple import math math Co = namedtuple('Co', 'x y') Co namedtuple('Co', 'x y') namedtuple 'Co' 'x y' def f(i, n, l, r):
    if i >= n:
        print(l.x, l.y)
        return
    il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y))
    ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y))

    trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y)
    triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y)
    trico = Co(trix, triy)

    f(i+1, n, l, il)
    #print(il.x, il.y)
    f(i+1, n, il, trico)
    #print(trico.x, trico.y)
    f(i+1, n, trico, ir)
    #print(ir.x, ir.y)
    f(i+1, n, ir, r) f if i >= n:
        print(l.x, l.y)
        return
     i >= n i n print(l.x, l.y) print l.x l x l.y l y return il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y)) il Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y)) Co x=(1/3 * r.x + (1 - 1/3) * l.x) x 1/3 * r.x + (1 - 1/3) * l.x 1/3 * r.x 1/3 1 3 r.x r x (1 - 1/3) * l.x 1 - 1/3 1 1/3 1 3 l.x l x y=(1/3 * r.y + (1 - 1/3) * l.y) y 1/3 * r.y + (1 - 1/3) * l.y 1/3 * r.y 1/3 1 3 r.y r y (1 - 1/3) * l.y 1 - 1/3 1 1/3 1 3 l.y l y ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y)) ir Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y)) Co x=(2/3 * r.x + (1 - 2/3) * l.x) x 2/3 * r.x + (1 - 2/3) * l.x 2/3 * r.x 2/3 2 3 r.x r x (1 - 2/3) * l.x 1 - 2/3 1 2/3 2 3 l.x l x y=(2/3 * r.y + (1 - 2/3) * l.y) y 2/3 * r.y + (1 - 2/3) * l.y 2/3 * r.y 2/3 2 3 r.y r y (1 - 2/3) * l.y 1 - 2/3 1 2/3 2 3 l.y l y trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y) trix 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y) 1/2 1 2 ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y ir.x + il.x - math.sqrt(3) * ir.y ir.x + il.x ir.x ir x il.x il x math.sqrt(3) * ir.y math.sqrt(3) math.sqrt math sqrt 3 ir.y ir y math.sqrt(3) * il.y math.sqrt(3) math.sqrt math sqrt 3 il.y il y triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y) triy 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y) 1/2 1 2 math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y math.sqrt(3) * ir.x - math.sqrt(3) * il.x math.sqrt(3) * ir.x math.sqrt(3) math.sqrt math sqrt 3 ir.x ir x math.sqrt(3) * il.x math.sqrt(3) math.sqrt math sqrt 3 il.x il x ir.y ir y il.y il y trico = Co(trix, triy) trico Co(trix, triy) Co trix triy f(i+1, n, l, il) f i+1 i 1 n l il f(i+1, n, il, trico) f i+1 i 1 n il trico f(i+1, n, trico, ir) f i+1 i 1 n trico ir f(i+1, n, ir, r) f i+1 i 1 n ir r i i n n l l r r if __name__ == '__main__':
    n = int(input())
    #print(0, 0)
    f(0, n, Co(0,0), Co(100,0))
    print(100, 0) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input f(0, n, Co(0,0), Co(100,0)) f 0 n Co(0,0) Co 0 0 Co(100,0) Co 100 0 print(100, 0) print 100 0 n = int(input()) int(input()) n Co = namedtuple('Co', 'x y') namedtuple('Co', 'x y') Co def f(i, n, l, r):
    if i >= n:
        print(l.x, l.y)
        return
    il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y))
    ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y))

    trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y)
    triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y)
    trico = Co(trix, triy)

    f(i+1, n, l, il)
    #print(il.x, il.y)
    f(i+1, n, il, trico)
    #print(trico.x, trico.y)
    f(i+1, n, trico, ir)
    #print(ir.x, ir.y)
    f(i+1, n, ir, r) def f(i, n, l, r):
    if i >= n:
        print(l.x, l.y)
        return
    il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y))
    ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y))

    trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y)
    triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y)
    trico = Co(trix, triy)

    f(i+1, n, l, il)
    #print(il.x, il.y)
    f(i+1, n, il, trico)
    #print(trico.x, trico.y)
    f(i+1, n, trico, ir)
    #print(ir.x, ir.y)
    f(i+1, n, ir, r) f
from collections import namedtuple
import math
Co = namedtuple('Co', 'x y')

def f(i, n, l, r):
    if i >= n:
        print(l.x, l.y)
        return
    il = Co(x=(1/3 * r.x + (1 - 1/3) * l.x), y=(1/3 * r.y + (1 - 1/3) * l.y))
    ir = Co(x=(2/3 * r.x + (1 - 2/3) * l.x), y=(2/3 * r.y + (1 - 2/3) * l.y))

    trix = 1/2 * (ir.x + il.x - math.sqrt(3) * ir.y + math.sqrt(3) * il.y)
    triy = 1/2 * (math.sqrt(3) * ir.x - math.sqrt(3) * il.x + ir.y + il.y)
    trico = Co(trix, triy)

    f(i+1, n, l, il)
    #print(il.x, il.y)
    f(i+1, n, il, trico)
    #print(trico.x, trico.y)
    f(i+1, n, trico, ir)
    #print(ir.x, ir.y)
    f(i+1, n, ir, r)

if __name__ == '__main__':
    n = int(input())
    #print(0, 0)
    f(0, n, Co(0,0), Co(100,0))
    print(100, 0)

