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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.w: G = None
        self.p: C = None
        self.q: H = None
        self.x: C = None
        self.y: C = None
        self.v: J = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.w: G = None
        self.p: C = None
        self.q: H = None
        self.x: C = None
        self.y: C = None
        self.v: J = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

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

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