class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.w: J = None
        self.t: I = None
        self.v: J = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.z: C = None
        self.s: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: G = None
        self.p: J = None
        self.q: I = None
        self.u: A = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

j = A("j")
e = B("e")
m = C("m")
k = D("k")
l = E("l")
g = F("g")
h = G("h")
i = H("i")
b = I("b")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.w: J = None
        self.t: I = None
        self.v: J = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.z: C = None
        self.s: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: G = None
        self.p: J = None
        self.q: I = None
        self.u: A = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

j = A("j")
e = B("e")
m = C("m")
k = D("k")
l = E("l")
g = F("g")
h = G("h")
i = H("i")
b = I("b")
d = J("d")

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