class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: J = None
        self.y: H = None
        self.q: D = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.v: D = None
        self.x: B = None
        self.p: B = None
        self.u: G = None
        self.t: J = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: J = None
        self.y: H = None
        self.q: D = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.v: D = None
        self.x: B = None
        self.p: B = None
        self.u: G = None
        self.t: J = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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