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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
g = D("g")
i = E("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
g = D("g")
i = E("i")

b.w = e
b.u = i
b.o = g
b.y = g
e.u = l
e.v = b
e.r = i
e.t = i
l.t = e
g.v = i
g.s = i
g.q = e
g.y = b
g.x = b
i.s = l
assert l.t.u.t.u.txt == "l"