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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: C = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: B = None
        self.t: J = None
        self.u: E = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: D = None
        self.v: C = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

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

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

h = A("h")
c = B("c")
e = C("e")
i = D("i")
n = E("n")
j = F("j")
m = G("m")
f = H("f")
b = I("b")
l = J("l")

h.w = f
h.s = n
h.y = j
h.x = j
h.q = l
h.t = l
h.z = i
h.u = e
h.r = e
h.v = e
c.y = b
c.t = e
c.x = n
c.o = j
e.q = m
e.r = c
e.t = l
e.u = n
e.z = i
i.o = e
i.t = e
i.y = b
i.q = n
i.v = m
i.w = m
i.x = m
i.p = f
i.s = h
n.s = i
j.q = l
j.u = m
m.q = l
m.z = i
m.x = i
m.v = e
m.y = j
f.t = h
b.z = n
b.s = n
l.u = i
l.y = j
l.v = j
l.s = f
l.q = e
l.z = n
assert m.y.u.z.q.s.q.s.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.y: F = None
        self.q: J = None
        self.z: D = None
        self.x: F = None
        self.t: J = None
        self.u: C = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: C = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: B = None
        self.t: J = None
        self.u: E = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: D = None
        self.v: C = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

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

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

h = A("h")
c = B("c")
e = C("e")
i = D("i")
n = E("n")
j = F("j")
m = G("m")
f = H("f")
b = I("b")
l = J("l")

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