class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: I = None
        self.y: D = None
        self.z: F = None
        self.w: I = None
        self.t: G = None
        self.x: B = None
        self.v: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.x: E = None
        self.t: I = None
        self.v: E = None
        self.y: E = None
        self.o: J = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: I = None
        self.y: D = None
        self.z: F = None
        self.w: I = None
        self.t: G = None
        self.x: B = None
        self.v: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.x: E = None
        self.t: I = None
        self.v: E = None
        self.y: E = None
        self.o: J = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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