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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: H = None
        self.w: C = None
        self.z: I = None
        self.u: G = None
        self.r: A = None
        self.s: A = None
        self.q: A = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: D = None
        self.y: C = None
        self.u: A = None
        self.s: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: H = None
        self.w: C = None
        self.z: I = None
        self.u: G = None
        self.r: A = None
        self.s: A = None
        self.q: A = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: D = None
        self.y: C = None
        self.u: A = None
        self.s: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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