class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: B = None
        self.r: B = None
        self.t: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.q: D = None
        self.u: I = None
        self.t: F = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.q: D = None
        self.u: I = None
        self.t: F = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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