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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.w: D = None
        self.txt = txt

j = A("j")
e = B("e")
d = C("d")
b = D("b")
n = E("n")
c = D("c")
g = B("g")

j.s = e
j.v = c
j.t = g
e.q = n
e.y = n
e.t = b
e.s = b
e.r = j
d.q = j
d.w = g
b.u = e
b.x = c
n.q = g
n.p = c
n.w = b
c.u = e
c.x = b
g.q = n
g.y = n
g.t = c
g.s = c
g.r = j
assert c.x.x.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.w: D = None
        self.txt = txt

j = A("j")
e = B("e")
d = C("d")
b = D("b")
n = E("n")
c = D("c")
g = B("g")

j.s = e
j.v = c
j.t = g
e.q = n
e.y = n
e.t = b
e.s = b
e.r = j
d.q = j
d.w = g
b.u = e
b.x = c
n.q = g
n.p = c
n.w = b
c.u = e
c.x = b
g.q = n
g.y = n
g.t = c
g.s = c
g.r = j
assert c.x.x.x.u.txt == "e"