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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: E = None
        self.r: F = None
        self.u: J = None
        self.t: C = None
        self.y: E = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: D = None
        self.z: I = None
        self.x: E = None
        self.s: H = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.x: C = None
        self.r: D = None
        self.o: F = None
        self.txt = txt

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

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

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

m.r = f
m.t = a
m.p = d
m.q = c
c.z = l
c.s = f
c.y = f
c.r = k
c.p = k
c.o = k
c.u = a
c.t = d
d.v = a
d.t = k
n.q = m
n.r = m
n.x = k
n.t = b
n.z = d
n.v = c
n.w = f
n.y = l
f.x = m
f.p = m
f.v = m
f.r = c
f.s = k
f.y = n
f.z = d
k.y = a
k.r = a
k.p = n
k.z = l
k.x = f
k.s = b
e.o = f
e.s = f
e.r = c
e.z = k
e.t = b
b.q = k
b.o = k
b.s = f
b.x = d
b.r = n
l.u = n
a.y = e
a.p = f
assert e.s.r.u.p.x.r.y.t.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: J = None
        self.p: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: E = None
        self.r: F = None
        self.u: J = None
        self.t: C = None
        self.y: E = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: D = None
        self.z: I = None
        self.x: E = None
        self.s: H = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.x: C = None
        self.r: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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