class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

n = A("n")
i = B("i")
a = C("a")
e = D("e")
k = E("k")
b = F("b")
h = A("h")

n.y = k
n.s = i
n.r = h
n.o = e
i.z = b
i.x = e
a.y = e
a.w = e
a.o = e
a.v = h
e.t = k
k.t = a
k.u = a
k.y = n
k.w = e
b.v = h
b.z = n
b.w = e
h.y = k
h.s = i
h.r = n
h.o = e
assert h.y.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

n = A("n")
i = B("i")
a = C("a")
e = D("e")
k = E("k")
b = F("b")
h = A("h")

n.y = k
n.s = i
n.r = h
n.o = e
i.z = b
i.x = e
a.y = e
a.w = e
a.o = e
a.v = h
e.t = k
k.t = a
k.u = a
k.y = n
k.w = e
b.v = h
b.z = n
b.w = e
h.y = k
h.s = i
h.r = n
h.o = e
assert h.y.w.t.txt == "k"