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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.z: A = None
        self.t: B = None
        self.u: E = None
        self.q: B = None
        self.p: J = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.y: G = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.z: A = None
        self.t: B = None
        self.u: E = None
        self.q: B = None
        self.p: J = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.y: G = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

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

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

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