class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: J = None
        self.w: J = None
        self.r: G = None
        self.u: F = None
        self.q: C = None
        self.o: E = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: F = None
        self.q: J = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: E = None
        self.z: C = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: F = None
        self.q: J = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: E = None
        self.z: C = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

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