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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.y: I = None
        self.p: D = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.z: A = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: I = None
        self.q: C = None
        self.r: H = None
        self.t: H = None
        self.z: J = None
        self.x: J = None
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.x: J = None
        self.t: I = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.t: A = None
        self.u: D = None
        self.v: D = None
        self.y: C = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.o: I = None
        self.txt = txt

a = A("a")
j = B("j")
c = C("c")
l = D("l")
d = E("d")
h = F("h")
g = G("g")
k = H("k")
e = I("e")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.y: I = None
        self.p: D = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.z: A = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: I = None
        self.q: C = None
        self.r: H = None
        self.t: H = None
        self.z: J = None
        self.x: J = None
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.x: J = None
        self.t: I = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.t: A = None
        self.u: D = None
        self.v: D = None
        self.y: C = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.o: I = None
        self.txt = txt

a = A("a")
j = B("j")
c = C("c")
l = D("l")
d = E("d")
h = F("h")
g = G("g")
k = H("k")
e = I("e")
b = J("b")

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