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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: I = None
        self.t: F = None
        self.w: C = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: J = None
        self.r: E = None
        self.y: H = None
        self.s: B = None
        self.p: A = None
        self.t: B = None
        self.z: A = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.p: J = None
        self.s: J = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.o: F = None
        self.z: H = None
        self.q: D = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: I = None
        self.t: F = None
        self.w: C = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: J = None
        self.r: E = None
        self.y: H = None
        self.s: B = None
        self.p: A = None
        self.t: B = None
        self.z: A = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.p: J = None
        self.s: J = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.o: F = None
        self.z: H = None
        self.q: D = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

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