class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: J = None
        self.v: D = None
        self.o: H = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.y: J = None
        self.w: G = None
        self.v: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.y: J = None
        self.w: G = None
        self.v: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

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