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

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

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

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

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

g = A("g")
f = B("f")
b = C("b")
k = D("k")
m = E("m")
e = D("e")

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

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

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

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

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

g = A("g")
f = B("f")
b = C("b")
k = D("k")
m = E("m")
e = D("e")

g.u = m
g.y = m
g.t = m
f.w = b
f.y = b
f.q = e
f.o = e
b.x = f
b.r = m
k.s = e
k.x = m
m.v = e
m.q = g
e.s = k
e.x = m
assert f.w.r.q.u.v.s.txt == "k"