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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.y: F = None
        self.u: E = None
        self.x: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.y: F = None
        self.u: E = None
        self.x: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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