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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.u: C = None
        self.t: F = None
        self.v: C = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.v: J = None
        self.s: B = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

m.p = h
m.s = l
m.v = e
a.s = i
a.o = e
a.t = e
a.u = h
a.v = h
a.q = l
h.z = j
h.o = j
h.v = c
d.p = e
d.o = b
j.v = b
j.q = a
j.w = c
e.t = a
e.x = a
e.u = i
l.q = m
l.p = a
l.z = a
i.o = h
i.w = h
i.u = m
c.x = j
c.z = h
c.v = b
c.w = b
c.s = a
c.o = d
b.z = h
b.y = i
assert h.z.q.s.u.p.v.z.v.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.u: C = None
        self.t: F = None
        self.v: C = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.v: J = None
        self.s: B = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

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