from math import sqrt

n = int(input())
sin60 = sqrt(3) / 2
cos60 = 1 / 2


def koch(x1, y1, x2, y2, depth):
    global sin60, cos60, n
    if depth > n:
        return
    dx, dy = x2 - x1, y2 - y1
    dx3, dy3 = dx / 3, dy / 3
    xs, ys = x1 + dx3, y1 + dy3
    xt, yt = x2 - dx3, y2 - dy3
    xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3
    depth += 1
    for xy in koch(x1, y1, xs, ys, depth):
        yield xy
    yield (xs, ys)
    for xy in koch(xs, ys, xu, yu, depth):
        yield xy
    yield (xu, yu)
    for xy in koch(xu, yu, xt, yt, depth):
        yield xy
    yield (xt, yt)
    for xy in koch(xt, yt, x2, y2, depth):
        yield xy


print(0.0, 0.0)
for xy in koch(0.0, 0.0, 100.0, 0.0, 1):
    print(*xy)
print(100.0, 0.0) from math import sqrt n = int(input()) n int(input()) int input() input sin60 = sqrt(3) / 2 sin60 sqrt(3) / 2 sqrt(3) sqrt 3 2 cos60 = 1 / 2 cos60 1 / 2 1 2 def koch(x1, y1, x2, y2, depth):
    global sin60, cos60, n
    if depth > n:
        return
    dx, dy = x2 - x1, y2 - y1
    dx3, dy3 = dx / 3, dy / 3
    xs, ys = x1 + dx3, y1 + dy3
    xt, yt = x2 - dx3, y2 - dy3
    xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3
    depth += 1
    for xy in koch(x1, y1, xs, ys, depth):
        yield xy
    yield (xs, ys)
    for xy in koch(xs, ys, xu, yu, depth):
        yield xy
    yield (xu, yu)
    for xy in koch(xu, yu, xt, yt, depth):
        yield xy
    yield (xt, yt)
    for xy in koch(xt, yt, x2, y2, depth):
        yield xy koch global sin60, cos60, n if depth > n:
        return
     depth > n depth n return dx, dy = x2 - x1, y2 - y1 dx x2 - x1 x2 x1 dy y2 - y1 y2 y1 dx3, dy3 = dx / 3, dy / 3 dx3 dx / 3 dx 3 dy3 dy / 3 dy 3 xs, ys = x1 + dx3, y1 + dy3 xs x1 + dx3 x1 dx3 ys y1 + dy3 y1 dy3 xt, yt = x2 - dx3, y2 - dy3 xt x2 - dx3 x2 dx3 yt y2 - dy3 y2 dy3 xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3 xu xs + cos60 * dx3 - sin60 * dy3 xs + cos60 * dx3 xs cos60 * dx3 cos60 dx3 sin60 * dy3 sin60 dy3 yu ys + sin60 * dx3 + cos60 * dy3 ys + sin60 * dx3 ys sin60 * dx3 sin60 dx3 cos60 * dy3 cos60 dy3 depth += 1 depth 1 for xy in koch(x1, y1, xs, ys, depth):
        yield xy
     xy koch(x1, y1, xs, ys, depth) koch x1 y1 xs ys depth yield xy xy yield (xs, ys) (xs, ys) xs ys for xy in koch(xs, ys, xu, yu, depth):
        yield xy
     xy koch(xs, ys, xu, yu, depth) koch xs ys xu yu depth yield xy xy yield (xu, yu) (xu, yu) xu yu for xy in koch(xu, yu, xt, yt, depth):
        yield xy
     xy koch(xu, yu, xt, yt, depth) koch xu yu xt yt depth yield xy xy yield (xt, yt) (xt, yt) xt yt for xy in koch(xt, yt, x2, y2, depth):
        yield xy xy koch(xt, yt, x2, y2, depth) koch xt yt x2 y2 depth yield xy xy x1 x1 y1 y1 x2 x2 y2 y2 depth depth print(0.0, 0.0) print 0.0 0.0 for xy in koch(0.0, 0.0, 100.0, 0.0, 1):
    print(*xy) xy koch(0.0, 0.0, 100.0, 0.0, 1) koch 0.0 0.0 100.0 0.0 1 print(*xy) print *xy xy print(100.0, 0.0) print 100.0 0.0 cos60 = 1 / 2 1 / 2 cos60 sin60 = sqrt(3) / 2 sqrt(3) / 2 sin60 def koch(x1, y1, x2, y2, depth):
    global sin60, cos60, n
    if depth > n:
        return
    dx, dy = x2 - x1, y2 - y1
    dx3, dy3 = dx / 3, dy / 3
    xs, ys = x1 + dx3, y1 + dy3
    xt, yt = x2 - dx3, y2 - dy3
    xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3
    depth += 1
    for xy in koch(x1, y1, xs, ys, depth):
        yield xy
    yield (xs, ys)
    for xy in koch(xs, ys, xu, yu, depth):
        yield xy
    yield (xu, yu)
    for xy in koch(xu, yu, xt, yt, depth):
        yield xy
    yield (xt, yt)
    for xy in koch(xt, yt, x2, y2, depth):
        yield xy def koch(x1, y1, x2, y2, depth):
    global sin60, cos60, n
    if depth > n:
        return
    dx, dy = x2 - x1, y2 - y1
    dx3, dy3 = dx / 3, dy / 3
    xs, ys = x1 + dx3, y1 + dy3
    xt, yt = x2 - dx3, y2 - dy3
    xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3
    depth += 1
    for xy in koch(x1, y1, xs, ys, depth):
        yield xy
    yield (xs, ys)
    for xy in koch(xs, ys, xu, yu, depth):
        yield xy
    yield (xu, yu)
    for xy in koch(xu, yu, xt, yt, depth):
        yield xy
    yield (xt, yt)
    for xy in koch(xt, yt, x2, y2, depth):
        yield xy koch n = int(input()) int(input()) n
from math import sqrt

n = int(input())
sin60 = sqrt(3) / 2
cos60 = 1 / 2


def koch(x1, y1, x2, y2, depth):
    global sin60, cos60, n
    if depth > n:
        return
    dx, dy = x2 - x1, y2 - y1
    dx3, dy3 = dx / 3, dy / 3
    xs, ys = x1 + dx3, y1 + dy3
    xt, yt = x2 - dx3, y2 - dy3
    xu, yu = xs + cos60 * dx3 - sin60 * dy3, ys + sin60 * dx3 + cos60 * dy3
    depth += 1
    for xy in koch(x1, y1, xs, ys, depth):
        yield xy
    yield (xs, ys)
    for xy in koch(xs, ys, xu, yu, depth):
        yield xy
    yield (xu, yu)
    for xy in koch(xu, yu, xt, yt, depth):
        yield xy
    yield (xt, yt)
    for xy in koch(xt, yt, x2, y2, depth):
        yield xy


print(0.0, 0.0)
for xy in koch(0.0, 0.0, 100.0, 0.0, 1):
    print(*xy)
print(100.0, 0.0)