import math
N = int(input())
X = [0., 0.]
Y = [100., 0.]

rad = math.pi / 2 * 2 /3

def rot(rad, pos):
    return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]]


def coh(left, right, cnt):
    
    if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1)

print(*X)
coh(X, Y, N)
print(*Y) import math math N = int(input()) N int(input()) int input() input X = [0., 0.] X [0., 0.] 0. 0. Y = [100., 0.] Y [100., 0.] 100. 0. rad = math.pi / 2 * 2 /3 rad math.pi / 2 * 2 /3 math.pi / 2 * 2 math.pi / 2 math.pi math pi 2 2 3 def rot(rad, pos):
    return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]] rot return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]] [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]] math.cos(rad)*pos[0] - math.sin(rad)*pos[1] math.cos(rad)*pos[0] math.cos(rad) math.cos math cos rad pos[0] pos 0 math.sin(rad)*pos[1] math.sin(rad) math.sin math sin rad pos[1] pos 1 math.sin(rad)*pos[0] + math.cos(rad)*pos[1] math.sin(rad)*pos[0] math.sin(rad) math.sin math sin rad pos[0] pos 0 math.cos(rad)*pos[1] math.cos(rad) math.cos math cos rad pos[1] pos 1 rad rad pos pos def coh(left, right, cnt):
    
    if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1) coh if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1) cnt == 0 cnt 0 return s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]] s [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]] (right[0] - left[0]) / 3 + left[0] (right[0] - left[0]) / 3 right[0] - left[0] right[0] right 0 left[0] left 0 3 left[0] left 0 (right[1] - left[1]) / 3 + left[1] (right[1] - left[1]) / 3 right[1] - left[1] right[1] right 1 left[1] left 1 3 left[1] left 1 t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]] t [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]] (right[0] - left[0]) * 2 / 3 + left[0] (right[0] - left[0]) * 2 / 3 (right[0] - left[0]) * 2 right[0] - left[0] right[0] right 0 left[0] left 0 2 3 left[0] left 0 (right[1] - left[1]) * 2 / 3 + left[1] (right[1] - left[1]) * 2 / 3 (right[1] - left[1]) * 2 right[1] - left[1] right[1] right 1 left[1] left 1 2 3 left[1] left 1 ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]]) ux rot(rad, [t[0] - s[0], t[1] - s[1]]) rot rad [t[0] - s[0], t[1] - s[1]] t[0] - s[0] t[0] t 0 s[0] s 0 t[1] - s[1] t[1] t 1 s[1] s 1 uy u = [ux + s[0], uy + s[1]] u [ux + s[0], uy + s[1]] ux + s[0] ux s[0] s 0 uy + s[1] uy s[1] s 1 coh(left, s, cnt-1) coh left s cnt-1 cnt 1 print(*s) print *s s coh(s, u, cnt-1) coh s u cnt-1 cnt 1 print(*u) print *u u coh(u, t, cnt-1) coh u t cnt-1 cnt 1 print(*t) print *t t coh(t, right, cnt-1) coh t right cnt-1 cnt 1 left left right right cnt cnt print(*X) print *X X coh(X, Y, N) coh X Y N print(*Y) print *Y Y rad = math.pi / 2 * 2 /3 math.pi / 2 * 2 /3 rad def coh(left, right, cnt):
    
    if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1) def coh(left, right, cnt):
    
    if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1) coh Y = [100., 0.] [100., 0.] Y N = int(input()) int(input()) N X = [0., 0.] [0., 0.] X def rot(rad, pos):
    return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]] def rot(rad, pos):
    return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]] rot
import math
N = int(input())
X = [0., 0.]
Y = [100., 0.]

rad = math.pi / 2 * 2 /3

def rot(rad, pos):
    return [math.cos(rad)*pos[0] - math.sin(rad)*pos[1], math.sin(rad)*pos[0] + math.cos(rad)*pos[1]]


def coh(left, right, cnt):
    
    if cnt == 0:
        return
    else:
        s = [(right[0] - left[0]) / 3 + left[0], (right[1] - left[1]) / 3 + left[1]]
        t = [(right[0] - left[0]) * 2 / 3 + left[0], (right[1] - left[1]) * 2 / 3 + left[1]]
        ux, uy = rot(rad, [t[0] - s[0], t[1] - s[1]])
        u = [ux + s[0], uy + s[1]]

        coh(left, s, cnt-1)
        print(*s)
        coh(s, u, cnt-1)
        print(*u)
        coh(u, t, cnt-1)
        print(*t)
        coh(t, right, cnt-1)

print(*X)
coh(X, Y, N)
print(*Y)
