import math


def koch(count, p1, p2):
    if count == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    s[0] = (2 * p1[0] + p2[0]) / 3
    s[1] = (2 * p1[1] + p2[1]) / 3
    t[0] = (2 * p2[0] + p1[0]) / 3
    t[1] = (2 * p2[1] + p1[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1]

    koch(count - 1, p1, s)
    print(s[0], s[1])

    koch(count - 1, s, u)
    print(u[0], u[1])

    koch(count - 1, u, t)
    print(t[0], t[1])

    koch(count - 1, t, p2)


if __name__ == '__main__':
    n = int(input())
    p1 = [0.0, 0.0]
    p2 = [100.0, 0.0]
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1])
 import math math def koch(count, p1, p2):
    if count == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    s[0] = (2 * p1[0] + p2[0]) / 3
    s[1] = (2 * p1[1] + p2[1]) / 3
    t[0] = (2 * p2[0] + p1[0]) / 3
    t[1] = (2 * p2[1] + p1[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1]

    koch(count - 1, p1, s)
    print(s[0], s[1])

    koch(count - 1, s, u)
    print(u[0], u[1])

    koch(count - 1, u, t)
    print(t[0], t[1])

    koch(count - 1, t, p2) koch if count == 0:
        return
     count == 0 count 0 return s = [0, 0] s [0, 0] 0 0 t = [0, 0] t [0, 0] 0 0 u = [0, 0] u [0, 0] 0 0 s[0] = (2 * p1[0] + p2[0]) / 3 s[0] s 0 (2 * p1[0] + p2[0]) / 3 2 * p1[0] + p2[0] 2 * p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 s[1] = (2 * p1[1] + p2[1]) / 3 s[1] s 1 (2 * p1[1] + p2[1]) / 3 2 * p1[1] + p2[1] 2 * p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 t[0] = (2 * p2[0] + p1[0]) / 3 t[0] t 0 (2 * p2[0] + p1[0]) / 3 2 * p2[0] + p1[0] 2 * p2[0] 2 p2[0] p2 0 p1[0] p1 0 3 t[1] = (2 * p2[1] + p1[1]) / 3 t[1] t 1 (2 * p2[1] + p1[1]) / 3 2 * p2[1] + p1[1] 2 * p2[1] 2 p2[1] p2 1 p1[1] p1 1 3 u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0] u[0] u 0 (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0] (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) (t[0] - s[0]) * math.cos(math.pi / 3) t[0] - s[0] t[0] t 0 s[0] s 0 math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 (t[1] - s[1]) * math.sin(math.pi / 3) t[1] - s[1] t[1] t 1 s[1] s 1 math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 s[0] s 0 u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1] u[1] u 1 (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1] (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) (t[0] - s[0]) * math.sin(math.pi / 3) t[0] - s[0] t[0] t 0 s[0] s 0 math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 (t[1] - s[1]) * math.cos(math.pi / 3) t[1] - s[1] t[1] t 1 s[1] s 1 math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 s[1] s 1 koch(count - 1, p1, s) koch count - 1 count 1 p1 s print(s[0], s[1]) print s[0] s 0 s[1] s 1 koch(count - 1, s, u) koch count - 1 count 1 s u print(u[0], u[1]) print u[0] u 0 u[1] u 1 koch(count - 1, u, t) koch count - 1 count 1 u t print(t[0], t[1]) print t[0] t 0 t[1] t 1 koch(count - 1, t, p2) koch count - 1 count 1 t p2 count count p1 p1 p2 p2 if __name__ == '__main__':
    n = int(input())
    p1 = [0.0, 0.0]
    p2 = [100.0, 0.0]
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1]) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input p1 = [0.0, 0.0] p1 [0.0, 0.0] 0.0 0.0 p2 = [100.0, 0.0] p2 [100.0, 0.0] 100.0 0.0 print(p1[0], p1[1]) print p1[0] p1 0 p1[1] p1 1 koch(n, p1, p2) koch n p1 p2 print(p2[0], p2[1]) print p2[0] p2 0 p2[1] p2 1 p2 = [100.0, 0.0] [100.0, 0.0] p2 p1 = [0.0, 0.0] [0.0, 0.0] p1 def koch(count, p1, p2):
    if count == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    s[0] = (2 * p1[0] + p2[0]) / 3
    s[1] = (2 * p1[1] + p2[1]) / 3
    t[0] = (2 * p2[0] + p1[0]) / 3
    t[1] = (2 * p2[1] + p1[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1]

    koch(count - 1, p1, s)
    print(s[0], s[1])

    koch(count - 1, s, u)
    print(u[0], u[1])

    koch(count - 1, u, t)
    print(t[0], t[1])

    koch(count - 1, t, p2) def koch(count, p1, p2):
    if count == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    s[0] = (2 * p1[0] + p2[0]) / 3
    s[1] = (2 * p1[1] + p2[1]) / 3
    t[0] = (2 * p2[0] + p1[0]) / 3
    t[1] = (2 * p2[1] + p1[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1]

    koch(count - 1, p1, s)
    print(s[0], s[1])

    koch(count - 1, s, u)
    print(u[0], u[1])

    koch(count - 1, u, t)
    print(t[0], t[1])

    koch(count - 1, t, p2) koch n = int(input()) int(input()) n
import math


def koch(count, p1, p2):
    if count == 0:
        return
    s = [0, 0]
    t = [0, 0]
    u = [0, 0]
    s[0] = (2 * p1[0] + p2[0]) / 3
    s[1] = (2 * p1[1] + p2[1]) / 3
    t[0] = (2 * p2[0] + p1[0]) / 3
    t[1] = (2 * p2[1] + p1[1]) / 3
    u[0] = (t[0] - s[0]) * math.cos(math.pi / 3) - (t[1] - s[1]) * math.sin(math.pi / 3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi / 3) + (t[1] - s[1]) * math.cos(math.pi / 3) + s[1]

    koch(count - 1, p1, s)
    print(s[0], s[1])

    koch(count - 1, s, u)
    print(u[0], u[1])

    koch(count - 1, u, t)
    print(t[0], t[1])

    koch(count - 1, t, p2)


if __name__ == '__main__':
    n = int(input())
    p1 = [0.0, 0.0]
    p2 = [100.0, 0.0]
    print(p1[0], p1[1])
    koch(n, p1, p2)
    print(p2[0], p2[1])

