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

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

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

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

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

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

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

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

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

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

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

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

f.u = b
f.o = n
f.t = n
g.w = f
g.o = e
e.v = g
e.r = l
e.y = l
e.x = l
e.t = b
l.v = g
b.x = l
b.v = f
b.r = e
n.w = f
n.o = e
assert l.v.w.u.x.txt == "l"