class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.v: G = None
        self.u: F = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: B = None
        self.x: I = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: A = None
        self.z: J = None
        self.s: I = None
        self.t: C = None
        self.p: J = None
        self.v: D = None
        self.u: I = None
        self.o: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: B = None
        self.x: I = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: A = None
        self.z: J = None
        self.s: I = None
        self.t: C = None
        self.p: J = None
        self.v: D = None
        self.u: I = None
        self.o: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: G = None
        self.txt = txt

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

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