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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: G = None
        self.w: J = None
        self.r: F = None
        self.y: E = None
        self.p: F = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: G = None
        self.w: J = None
        self.r: F = None
        self.y: E = None
        self.p: F = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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