class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: E = None
        self.x: C = None
        self.p: C = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.q: G = None
        self.p: G = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.q: G = None
        self.p: G = None
        self.u: F = None
        self.txt = txt

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

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