class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.z: A = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

c.u = l
c.v = i
c.q = a
i.o = e
i.t = f
l.w = a
l.r = a
l.u = f
l.x = d
d.v = c
d.z = c
d.s = c
d.q = c
d.u = f
e.u = i
a.u = f
f.o = a
f.t = i
assert c.q.u.o.u.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.z: A = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

c.u = l
c.v = i
c.q = a
i.o = e
i.t = f
l.w = a
l.r = a
l.u = f
l.x = d
d.v = c
d.z = c
d.s = c
d.q = c
d.u = f
e.u = i
a.u = f
f.o = a
f.t = i
assert c.q.u.o.u.t.o.txt == "e"