class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.w: C = None
        self.r: D = None
        self.txt = txt

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

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

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

e = A("e")
j = B("j")
c = C("c")
k = D("k")
l = D("l")
f = D("f")
a = D("a")

e.u = c
e.s = c
e.w = c
e.r = k
j.u = e
c.y = j
c.v = k
c.q = a
k.u = j
k.t = e
l.u = j
l.t = e
f.u = j
f.t = e
a.u = j
a.t = e
assert a.u.u.s.q.u.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.w: C = None
        self.r: D = None
        self.txt = txt

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

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

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

e = A("e")
j = B("j")
c = C("c")
k = D("k")
l = D("l")
f = D("f")
a = D("a")

e.u = c
e.s = c
e.w = c
e.r = k
j.u = e
c.y = j
c.v = k
c.q = a
k.u = j
k.t = e
l.u = j
l.t = e
f.u = j
f.t = e
a.u = j
a.t = e
assert a.u.u.s.q.u.u.s.txt == "c"