class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: A = None
        self.v: J = None
        self.y: F = None
        self.q: J = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.p: D = None
        self.z: B = None
        self.v: C = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: A = None
        self.v: J = None
        self.y: F = None
        self.q: J = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.p: D = None
        self.z: B = None
        self.v: C = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

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

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