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

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

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

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

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

c = A("c")
l = B("l")
n = C("n")
g = D("g")
b = E("b")

c.t = b
c.x = b
c.o = n
c.r = l
c.u = g
l.z = g
l.q = c
n.w = c
n.o = b
n.t = b
n.s = l
g.s = l
g.r = l
g.y = l
b.v = l
b.r = l
b.u = g
assert c.r.z.s.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.x: E = None
        self.r: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

c = A("c")
l = B("l")
n = C("n")
g = D("g")
b = E("b")

c.t = b
c.x = b
c.o = n
c.r = l
c.u = g
l.z = g
l.q = c
n.w = c
n.o = b
n.t = b
n.s = l
g.s = l
g.r = l
g.y = l
b.v = l
b.r = l
b.u = g
assert c.r.z.s.z.y.txt == "l"