class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: H = None
        self.t: G = None
        self.z: F = None
        self.v: E = None
        self.x: G = None
        self.s: I = None
        self.p: G = None
        self.o: F = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.r: H = None
        self.z: I = None
        self.w: F = None
        self.o: A = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.v: B = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.s: B = None
        self.q: D = None
        self.p: J = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.z: A = None
        self.o: E = None
        self.x: J = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

m.q = j
m.y = j
m.r = b
m.t = h
m.x = h
m.p = h
m.z = e
m.o = e
m.v = g
m.s = c
l.w = b
l.v = j
d.q = j
d.t = j
d.r = b
d.z = c
d.w = e
d.o = m
d.x = m
d.s = g
i.p = c
i.z = g
i.v = l
i.w = b
i.o = m
g.r = h
g.t = c
g.u = c
g.s = l
g.q = i
g.p = j
g.v = j
e.s = l
e.r = i
e.z = m
e.o = g
e.x = j
e.y = b
h.x = d
b.u = i
c.r = h
c.s = l
c.u = d
c.v = m
c.p = e
j.t = b
j.q = c
j.z = c
j.p = e
j.r = i
assert b.u.z.p.t.u.z.r.x.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: H = None
        self.t: G = None
        self.z: F = None
        self.v: E = None
        self.x: G = None
        self.s: I = None
        self.p: G = None
        self.o: F = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.r: H = None
        self.z: I = None
        self.w: F = None
        self.o: A = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.v: B = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.s: B = None
        self.q: D = None
        self.p: J = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.z: A = None
        self.o: E = None
        self.x: J = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

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