class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.v: D = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
l = C("l")
i = D("i")
a = E("a")
f = E("f")
c = D("c")
b = A("b")

e.x = b
e.r = c
e.v = l
d.q = e
d.x = f
d.v = c
d.t = c
d.o = a
l.q = e
l.t = d
l.p = b
i.t = l
a.o = i
a.y = d
a.u = e
f.o = i
f.y = d
f.u = e
c.t = l
b.x = e
b.r = i
b.v = l
assert d.t.t.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.v: D = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
l = C("l")
i = D("i")
a = E("a")
f = E("f")
c = D("c")
b = A("b")

e.x = b
e.r = c
e.v = l
d.q = e
d.x = f
d.v = c
d.t = c
d.o = a
l.q = e
l.t = d
l.p = b
i.t = l
a.o = i
a.y = d
a.u = e
f.o = i
f.y = d
f.u = e
c.t = l
b.x = e
b.r = i
b.v = l
assert d.t.t.q.x.txt == "b"