class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: G = None
        self.t: D = None
        self.o: I = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: J = None
        self.t: F = None
        self.v: H = None
        self.z: F = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: B = None
        self.u: H = None
        self.t: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: H = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: J = None
        self.t: F = None
        self.v: H = None
        self.z: F = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: B = None
        self.u: H = None
        self.t: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: H = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.txt = txt

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

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