class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: D = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.u: I = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.u: I = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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