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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.t: E = None
        self.x: B = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.t: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.t: E = None
        self.x: B = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.t: C = None
        self.o: E = None
        self.txt = txt

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

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